diff --git a/cypress/integration/common/5a_user_role.js b/cypress/integration/common/5a_user_role.js index b18473f423..71033c1cb5 100644 --- a/cypress/integration/common/5a_user_role.js +++ b/cypress/integration/common/5a_user_role.js @@ -70,12 +70,26 @@ export const genTest = (type, xcdb) => { // projectsPage.openProject(staticProjects.externalGQL.basic.name) // }) - it(`[${roles[roleType].name}] Left navigation menu, New User add`, () => { + it(`[${roles[roleType].name}] Left navigation menu, New User add`, (done) => { + cy.on('uncaught:exception', (err, runnable) => { + expect(err.message).to.include('Not allowed') + done() + return false + }) advancedSettings(roleType) + + done() }) - it(`[${roles[roleType].name}] Schema: create table, add/modify/delete column`, () => { + it(`[${roles[roleType].name}] Schema: create table, add/modify/delete column`, (done) => { + cy.on('uncaught:exception', (err, runnable) => { + expect(err.message).to.include('Not allowed') + done() + return false + }) editSchema(roleType) + + done() }) it(`[${roles[roleType].name}] Data: add/modify/delete row, update cell contents`, (done) => { @@ -95,22 +109,43 @@ export const genTest = (type, xcdb) => { done() }) - it(`[${roles[roleType].name}] Comments: view/add`, () => { - + it(`[${roles[roleType].name}] Comments: view/add`, (done) => { + cy.on('uncaught:exception', (err, runnable) => { + expect(err.message).to.include('Not allowed') + done() + return false + }) // Fix me! if (roleType != 'viewer') editComment(roleType) + + done() }) - it(`[${roles[roleType].name}] Right navigation menu, share view`, () => { + it(`[${roles[roleType].name}] Right navigation menu, share view`, (done) => { + + cy.on('uncaught:exception', (err, runnable) => { + expect(err.message).to.include('Not allowed') + done() + return false + }) + viewMenu(roleType) - }) - after(() => { - if ('viewer' == roleType) { - loginPage.loginAndOpenProject(type) - } + done() }) + + // after(() => { + // if ('viewer' == roleType) { + // loginPage.loginAndOpenProject('graphql', false) + // } + // }) + + // it(`Reset`, () => { + // if ('viewer' == roleType) { + // loginPage.loginAndOpenProject('graphql', false) + // } + // }) }) } diff --git a/cypress/integration/common/5b_preview_role.js b/cypress/integration/common/5b_preview_role.js index d5140a2996..e55b333aaf 100644 --- a/cypress/integration/common/5b_preview_role.js +++ b/cypress/integration/common/5b_preview_role.js @@ -237,6 +237,9 @@ export const genTest = (type, xcdb, roleType) => { describe('Role preview validations', () => { // Sign in/ open project + before(() => { + loginPage.loginAndOpenProject(type, xcdb) + }) // before(() => { // loginPage.signIn(roles.owner.credentials) // projectsPage.openProject('externalREST') diff --git a/cypress/integration/common/6c_swagger_api.js b/cypress/integration/common/6c_swagger_api.js index 18c506c1ee..533186949f 100644 --- a/cypress/integration/common/6c_swagger_api.js +++ b/cypress/integration/common/6c_swagger_api.js @@ -173,11 +173,11 @@ export const genTest = (type, xcdb) => { }) // clean-up created file (shared.json) - after(() => { - cy.exec("del shared.json").then(()=> { - cy.log("file cleaned up!") - }) - }) + // after(() => { + // cy.exec("del shared.json").then(()=> { + // cy.log("file cleaned up!") + // }) + // }) }) } } diff --git a/cypress/support/page_objects/navigation.js b/cypress/support/page_objects/navigation.js index 2decbb1274..9ece2c400b 100644 --- a/cypress/support/page_objects/navigation.js +++ b/cypress/support/page_objects/navigation.js @@ -26,7 +26,7 @@ export class _loginPage { signIn(userCredentials) { this.go(urlPool.ncUrlSignIn) - cy.get('input[type="text"]', {timeout: 6000}).type(userCredentials.username) + cy.get('input[type="text"]', {timeout: 20000}).type(userCredentials.username) cy.get('input[type="password"]').type(userCredentials.password) cy.get('button:contains("SIGN IN")').click() @@ -38,7 +38,7 @@ export class _loginPage { signUp(userCredentials) { this.go(urlPool.ncUrlSignUp) - cy.get('input[type="text"]', {timeout: 6000}).type(userCredentials.username) + cy.get('input[type="text"]', {timeout: 20000}).type(userCredentials.username) cy.get('input[type="password"]').type(userCredentials.password) cy.get('button:contains("SIGN UP")').click()