diff --git a/cypress/integration/common/5a_user_role.js b/cypress/integration/common/5a_user_role.js index eacf07d4af..b18473f423 100644 --- a/cypress/integration/common/5a_user_role.js +++ b/cypress/integration/common/5a_user_role.js @@ -78,21 +78,21 @@ export const genTest = (type, xcdb) => { editSchema(roleType) }) - it(`[${roles[roleType].name}] Data: add/modify/delete row, update cell contents`, (/*done*/) => { + it(`[${roles[roleType].name}] Data: add/modify/delete row, update cell contents`, (done) => { // known issue: to be fixed // right click raising alarm 'not allowed' for viewer // - // cy.on('uncaught:exception', (err, runnable) => { - // expect(err.message).to.include('Not allowed') - // done() - // return false - // }) + cy.on('uncaught:exception', (err, runnable) => { + expect(err.message).to.include('Not allowed') + done() + return false + }) if (roleType != 'editor') editData(roleType) - // done() + done() }) it(`[${roles[roleType].name}] Comments: view/add`, () => { diff --git a/cypress/integration/common/6c_swagger_api.js b/cypress/integration/common/6c_swagger_api.js index a46b905b71..18c506c1ee 100644 --- a/cypress/integration/common/6c_swagger_api.js +++ b/cypress/integration/common/6c_swagger_api.js @@ -57,20 +57,24 @@ export const genTest = (type, xcdb) => { let URL = jsonPayload.SWAGGER_URL Token = jsonPayload.AUTH_TOKEN - cy.visit(URL) - cy.log(Token) - - // validate; API order assumed - cy.get('#operations-tag-Authentication').next().find('.opblock').should('has.length', 9) - getSwaggerButton("Authentication", 0, "User login").should('exist') - getSwaggerButton("Authentication", 1, "User signup").should('exist') - getSwaggerButton("Authentication", 2, "Password Forgot").should('exist') - getSwaggerButton("Authentication", 3, "Email validate link").should('exist') - getSwaggerButton("Authentication", 4, "Validate password reset token").should('exist') - getSwaggerButton("Authentication", 5, "Password reset").should('exist') - getSwaggerButton("Authentication", 6, "User details").should('exist') - getSwaggerButton("Authentication", 7, "Update user details").should('exist') - getSwaggerButton("Authentication", 8, "Update user details").should('exist') + cy.visit(URL).then(() => { + + // wait to allow time for SWAGGER Library loading to finish + cy.wait(5000) + cy.log(Token) + + // validate; API order assumed + cy.get('#operations-tag-Authentication', {timeout: 10000}).next().find('.opblock').should('has.length', 9) + getSwaggerButton("Authentication", 0, "User login").should('exist') + getSwaggerButton("Authentication", 1, "User signup").should('exist') + getSwaggerButton("Authentication", 2, "Password Forgot").should('exist') + getSwaggerButton("Authentication", 3, "Email validate link").should('exist') + getSwaggerButton("Authentication", 4, "Validate password reset token").should('exist') + getSwaggerButton("Authentication", 5, "Password reset").should('exist') + getSwaggerButton("Authentication", 6, "User details").should('exist') + getSwaggerButton("Authentication", 7, "Update user details").should('exist') + getSwaggerButton("Authentication", 8, "Update user details").should('exist') + }) }) })