diff --git a/cypress/integration/common/table_column_operations_spec.js b/cypress/integration/common/table_column_operations_spec.js index ac2f494d8d..09bb26da96 100644 --- a/cypress/integration/common/table_column_operations_spec.js +++ b/cypress/integration/common/table_column_operations_spec.js @@ -1,9 +1,7 @@ const genTest = (type) => { describe(`${type.toUpperCase()} api - Table Column`, () => { - const randVal = 'Test' + Date.now(); - const updatedRandVal = 'Updated' + Date.now(); - const name = 'Test' + Date.now(); + const name = 'Table' + Date.now(); before(() => { cy.waitForSpinners(); @@ -26,10 +24,10 @@ const genTest = (type) => { }); it('Create Table Column', () => { - cy.get('.nc-project-tree').find('.v-list-item__title:contains(Tables)', {timeout: 10000}) - .first().click() - - cy.get('.nc-project-tree').contains(name, {timeout: 6000}).first().click({force: true}); + // cy.get('.nc-project-tree').find('.v-list-item__title:contains(Tables)', {timeout: 10000}) + // .first().click() + // + // cy.get('.nc-project-tree').contains(name, {timeout: 6000}).first().click({force: true}); cy.get(`.project-tab:contains(${name}):visible`).should('exist') @@ -78,6 +76,8 @@ const genTest = (type) => { .trigger('mouseover', {force: true}) .click({force: true}) + cy.get('.nc-column-edit').click() + // rename column and verify cy.get('.nc-column-name-input input').clear().type('updated_column') cy.get('.nc-col-create-or-edit-card').contains('Save').click() diff --git a/cypress/integration/common/table_row_operations_spec.js b/cypress/integration/common/table_row_operations_spec.js index d5e805c2bf..7c6af30c4f 100644 --- a/cypress/integration/common/table_row_operations_spec.js +++ b/cypress/integration/common/table_row_operations_spec.js @@ -3,7 +3,7 @@ const genTest = (type) => { describe(`${type.toUpperCase()} api - Table Row`, () => { const randVal = 'Test' + Date.now(); const updatedRandVal = 'Updated' + Date.now(); - const name = 'Test' + Date.now(); + const name = 'Tablerow' + Date.now(); before(() => { cy.waitForSpinners(); @@ -30,7 +30,7 @@ const genTest = (type) => { cy.get('#data-table-form-Title > input').first().type(randVal); - cy.contains('Save Row').filter('button').click() + cy.contains('Save Row').filter('button').click({force:true}) cy.get('td').contains(randVal).should('exist'); @@ -40,11 +40,11 @@ const genTest = (type) => { cy.get('td').contains(randVal) .closest('tr') .find('.nc-row-expand-icon') - .click(); + .click({force:true}); cy.get('#data-table-form-Title > input').first().clear().type(updatedRandVal); - cy.contains('Save Row').filter('button').click() + cy.contains('Save Row').filter('button').click({force:true}) cy.get('td').contains(updatedRandVal).should('exist'); @@ -54,10 +54,10 @@ const genTest = (type) => { it('Delete row', () => { - cy.get('td').contains(updatedRandVal).rightclick() + cy.get('td').contains(updatedRandVal).rightclick({force:true}) // delete row - cy.getActiveMenu().find('.v-list-item:contains("Delete Row")').first().click() + cy.getActiveMenu().find('.v-list-item:contains("Delete Row")').first().click({force:true}) cy.wait(1000) cy.get('td').contains(randVal).should('not.exist'); }) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 82c91da5b7..bac12fa2d6 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -86,7 +86,6 @@ Cypress.Commands.add('openOrCreateRestProject', (_args) => { } else { cy.get('.nc-create-external-db-project').click() cy.url({timeout: 6000}).should('contain', '#/project') - cy.contains('GRAPHQL APIs').closest('label').click() cy.get('.database-field input').click().clear().type('sakila') cy.contains('Test Database Connection').click() cy.contains('Ok & Save Project', {timeout: 3000}).click() diff --git a/docker-compose-cypress.yml b/docker-compose-cypress.yml index 5b95b376f7..0b0225bc45 100644 --- a/docker-compose-cypress.yml +++ b/docker-compose-cypress.yml @@ -24,8 +24,8 @@ services: # cp -r /home/app1/ /home/app/ rm /home/app/package-lock.json rm /home/app/noco.db - # cd /home/app/ && npm i && EE=true npm run run - cd /home/app/ && npm i && EE=true npm run watch:run + cd /home/app/ && npm i && EE=true npm run run + # cd /home/app/ && npm i && EE=true npm run watch:run xc-cypress-nc-gui: network_mode: host image: node:14-alpine diff --git a/packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts b/packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts index c8d2f3d4a6..26cab36a59 100644 --- a/packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts +++ b/packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts @@ -76,7 +76,7 @@ class BaseModelSql extends BaseModel { limitDefault: process.env.DB_QUERY_LIMIT_DEFAULT || 10, limitMax: process.env.DB_QUERY_LIMIT_MAX || 500, limitMin: process.env.DB_QUERY_LIMIT_MIN || 1, - log: true, + log: false, explain: false, hasManyMax: 5, bulkLengthMax: 1000, diff --git a/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts b/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts index e2a4b14599..29355cff1c 100644 --- a/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts +++ b/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts @@ -492,11 +492,9 @@ export default class RestAuthCtrl { protected initJwtStrategy() { passport.use(new Strategy(this.jwtOptions, (jwtPayload, done) => { - console.time('fetch user') this.users.where({ email: jwtPayload?.email }).first().then(user => { - console.timeEnd('fetch user') if (user) { user.roles = 'owner,creator' return done(null, user); diff --git a/packages/nocodb/src/lib/noco/rest/RestAuthCtrlEE.ts b/packages/nocodb/src/lib/noco/rest/RestAuthCtrlEE.ts index 93569ef755..3e312d087d 100644 --- a/packages/nocodb/src/lib/noco/rest/RestAuthCtrlEE.ts +++ b/packages/nocodb/src/lib/noco/rest/RestAuthCtrlEE.ts @@ -159,7 +159,6 @@ export default class RestAuthCtrlEE extends RestAuthCtrl { ...this.jwtOptions, passReqToCallback: true }, (req, jwtPayload, done) => { - console.time('fetch user') const keyVals = [jwtPayload?.email] if (req.ncProjectId) { @@ -185,7 +184,6 @@ export default class RestAuthCtrlEE extends RestAuthCtrl { } else { // const roles = projectUser?.roles ? JSON.parse(projectUser.roles) : {guest: true}; - console.timeEnd('fetch user') if (user) { XcCache.set(key, user); return done(null, user);