console: allow modifying default value for PK (close #4075) (#4679)

This commit is contained in:
Fadi Khadra 2020-05-12 08:16:48 +02:00 committed by GitHub
parent 3dd72bf66c
commit cd1c562073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 1 deletions

View File

@ -38,6 +38,7 @@ Read more about the session argument for computed fields in the [docs](https://h
- console: avoid count queries for large tables (#4692)
- console: add read replica support section to pro popup (#4118)
- console: allow modifying default value for PK (fix #4075) (#4679)
- cli: list all avialable commands in root command help (fix #4623)
- docs: add section on actions vs. remote schemas to actions documentation (#4284)
- docs: fix wrong info about excluding scheme in CORS config

View File

@ -80,6 +80,16 @@ export const passMTRenameColumn = () => {
validateColumn(getTableName(0, testName), ['id'], 'success');
};
export const passMTChangeDefaultValueForPKey = () => {
cy.wait(10000);
cy.get(getElementFromAlias('modify-table-edit-column-0')).click();
cy.get(getElementFromAlias('edit-col-default'))
.clear()
.type('1234');
cy.get(getElementFromAlias('modify-table-column-0-save')).click();
cy.wait(15000);
};
export const passMTMoveToTable = () => {
cy.get(getElementFromAlias(getTableName(0, testName))).click();
cy.url().should(

View File

@ -20,6 +20,7 @@ import {
passCreateUniqueKey,
passModifyUniqueKey,
passRemoveUniqueKey,
passMTChangeDefaultValueForPKey,
} from './spec';
import { testMode } from '../../../helpers/common';
@ -51,6 +52,10 @@ export const runModifyTableTests = () => {
it('Pass modify with wrong default value', passMCWithRightDefaultValue);
it('Pass create foreign-key', passCreateForeignKey);
it('Pass remove foreign-key', passRemoveForeignKey);
it(
'Pass edit default value for primary key',
passMTChangeDefaultValueForPKey
);
it('Pass modifying a primary key', passModifyPkey);
it('Pass creating a unique key', passCreateUniqueKey);
it('Pass modifying a unique key', passModifyUniqueKey);

View File

@ -110,7 +110,6 @@ const ColumnEditor = ({
value={selectedProperties[colName].default || ''}
onChange={updateColumnDefault}
type="text"
disabled={columnProperties.pkConstraint}
data-test="edit-col-default"
theme={theme}
/>