From b6b9034a4c3cfd335af2bac35f55e0c6e4f0a5f7 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Wed, 25 Oct 2023 10:24:21 -0400 Subject: [PATCH 01/11] #2460 - fixing OAuth CI failures --- .../e2e/skill-expiration-table_spec.js | 41 +++++++++++-------- e2e-tests/cypress/support/commands.js | 5 +-- e2e-tests/package.json | 2 +- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/e2e-tests/cypress/e2e/skill-expiration-table_spec.js b/e2e-tests/cypress/e2e/skill-expiration-table_spec.js index c4d7e8fc27..52eb67295b 100644 --- a/e2e-tests/cypress/e2e/skill-expiration-table_spec.js +++ b/e2e-tests/cypress/e2e/skill-expiration-table_spec.js @@ -16,7 +16,12 @@ const moment = require("moment-timezone"); describe('Expired Skill Table Tests', () => { - + let proxyUser, userToValidate; + before(() => { + proxyUser = Cypress.env('proxyUser'); + userToValidate = Cypress.env('oauthMode') ? 'foo' : proxyUser; + }) + it('Expired skills show up in table', () => { cy.createProject(1) cy.createSubject(1, 1); @@ -25,8 +30,8 @@ describe('Expired Skill Table Tests', () => { cy.configureExpiration(1, 0, 1, 'DAILY'); const yesterday = moment.utc().subtract(1, 'day') const twoDaysAgo = moment.utc().subtract(2, 'day') - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: yesterday.format('YYYY-MM-DD HH:mm') }) - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }) + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: yesterday.format('YYYY-MM-DD HH:mm') }) + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }) cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: "user1", date: yesterday.format('YYYY-MM-DD HH:mm') }) cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: "user1", date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }) cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: "user2", date: yesterday.format('YYYY-MM-DD HH:mm') }) @@ -57,7 +62,7 @@ describe('Expired Skill Table Tests', () => { value: 'Very Great Skill 1' }, { colIndex: 1, - value: 'user0' + value: userToValidate }], ], 3); }); @@ -70,8 +75,8 @@ describe('Expired Skill Table Tests', () => { cy.configureExpiration(1, 0, 1, 'DAILY'); let yesterday = moment.utc().subtract(1, 'day') let twoDaysAgo = moment.utc().subtract(2, 'day') - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: yesterday.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: yesterday.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); for(let x = 1; x < 20; x++) { const user = "user" + x; @@ -147,7 +152,7 @@ describe('Expired Skill Table Tests', () => { cy.validateTable(tableSelector, [ [{ colIndex: 1, - value: 'user0' + value: userToValidate }], [{ colIndex: 1, @@ -273,7 +278,7 @@ describe('Expired Skill Table Tests', () => { }], [{ colIndex: 1, - value: 'user0' + value: userToValidate }], ], 10, true, 20); }); @@ -286,8 +291,8 @@ describe('Expired Skill Table Tests', () => { cy.configureExpiration(1, 0, 1, 'DAILY'); let yesterday = moment.utc().subtract(1, 'day') let twoDaysAgo = moment.utc().subtract(2, 'day') - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: yesterday.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: yesterday.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); for(let x = 1; x < 5; x++) { const user = "user" + x; @@ -320,7 +325,7 @@ describe('Expired Skill Table Tests', () => { cy.validateTable(tableSelector, [ [{ colIndex: 1, - value: 'user0' + value: userToValidate }], [{ colIndex: 1, @@ -355,7 +360,7 @@ describe('Expired Skill Table Tests', () => { cy.validateTable(tableSelector, [ [{ colIndex: 1, - value: 'user0' + value: userToValidate }], [{ colIndex: 1, @@ -388,12 +393,12 @@ describe('Expired Skill Table Tests', () => { cy.configureExpiration(3, 0, 1, 'DAILY'); let yesterday = moment.utc().subtract(1, 'day') let twoDaysAgo = moment.utc().subtract(2, 'day') - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: yesterday.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: Cypress.env('proxyUser'), date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 2, subjNum: 1, userId: Cypress.env('proxyUser'), date: yesterday.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 2, subjNum: 1, userId: Cypress.env('proxyUser'), date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 3, subjNum: 1, userId: Cypress.env('proxyUser'), date: yesterday.format('YYYY-MM-DD HH:mm') }); - cy.doReportSkill({ project: 1, skill: 3, subjNum: 1, userId: Cypress.env('proxyUser'), date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: yesterday.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 1, subjNum: 1, userId: proxyUser, date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 2, subjNum: 1, userId: proxyUser, date: yesterday.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 2, subjNum: 1, userId: proxyUser, date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 3, subjNum: 1, userId: proxyUser, date: yesterday.format('YYYY-MM-DD HH:mm') }); + cy.doReportSkill({ project: 1, skill: 3, subjNum: 1, userId: proxyUser, date: twoDaysAgo.format('YYYY-MM-DD HH:mm') }); cy.expireSkills(); diff --git a/e2e-tests/cypress/support/commands.js b/e2e-tests/cypress/support/commands.js index 5a84e4a929..574925a81f 100644 --- a/e2e-tests/cypress/support/commands.js +++ b/e2e-tests/cypress/support/commands.js @@ -1416,8 +1416,5 @@ Cypress.Commands.add('expireSkills', () => { cy.request('POST', `/root/runSkillExpiration`); cy.logout(); - cy.fixture('vars.json') - .then((vars) => { - cy.login(vars.defaultUser, vars.defaultPass); - }); + cy.loginAsAdminUser(); }); \ No newline at end of file diff --git a/e2e-tests/package.json b/e2e-tests/package.json index ac53b49271..7cd79ebbe0 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -19,7 +19,7 @@ "verifyMathImageSnapshotIsNotUsed": "if find cypress/e2e/ -type f -exec grep -in \"matchImageSnapshot\" {} + ; then exit -1; else exit 0; fi", "verifyThatNewSnapshotsAreNotCreated": "if git status | grep \"cypress/snapshots\" ; then exit -1; else exit 0; fi", "cy:open": "TZ=UTC cypress open --env type=base", - "cy:open:oauth": "TZ=UTC cypress open --env oauthMode=true --env type=base", + "cy:open:oauth": "TZ=UTC cypress open --env oauthMode=true,type=base", "cy:open:dev": "TZ=UTC cypress open --config baseUrl=http://localhost:8082 --env type=base", "cy:open:devEST": "TZ=EST cypress open --config baseUrl=http://localhost:8082 --env type=base", "cy:open:dev:oauth": "TZ=UTC cypress open --config baseUrl=http://localhost:8082 --env oauthMode=true,type=base", From 99904e3d74cbbf77328b37fc42de06c8079e8336 Mon Sep 17 00:00:00 2001 From: "EVOFORGE\\dimay" Date: Wed, 25 Oct 2023 13:51:07 -0400 Subject: [PATCH 02/11] #2460: fixed upload directory --- .github/workflows/build-and-test-ssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-ssl.yml b/.github/workflows/build-and-test-ssl.yml index 1fef6515ef..8d2c348303 100644 --- a/.github/workflows/build-and-test-ssl.yml +++ b/.github/workflows/build-and-test-ssl.yml @@ -90,7 +90,7 @@ jobs: path: | ./service/target/*.log ./e2e-tests/logs - ./e2e-tests/cypress/snapshots/*.js/__diff_output__/** + ./e2e-tests/cypress/visualRegression/diff From b18ca59f45b1b843e433510e5b1d6b64e5e54719 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 06:55:44 -0400 Subject: [PATCH 03/11] #2460 - wait for settings to be saved before navigating away --- e2e-tests/cypress/e2e/subjects_spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/e2e-tests/cypress/e2e/subjects_spec.js b/e2e-tests/cypress/e2e/subjects_spec.js index 88bb7f81b2..eb5c1c4e20 100644 --- a/e2e-tests/cypress/e2e/subjects_spec.js +++ b/e2e-tests/cypress/e2e/subjects_spec.js @@ -974,6 +974,12 @@ describe('Subjects Tests', () => { }); it('subject modal shows Root Help Url after it was update via UI', () => { + + cy.intercept('GET', '/admin/projects/proj1/settings') + .as('loadSettings'); + cy.intercept('POST', '/admin/projects/proj1/settings') + .as('saveSettings'); + cy.createSubject(1, 2, {helpUrl: '/some/path'}) cy.createSubject(1, 3, {helpUrl: 'https://www.OverrideHelpUrl.com/other/path'}) @@ -984,8 +990,11 @@ describe('Subjects Tests', () => { cy.get('[data-cy="closeSubjectButton"]').click(); cy.clickNav('Settings'); + cy.wait('@loadSettings'); cy.get('[data-cy="rootHelpUrlInput"]').type('https://someCoolWebsite.com/'); cy.get('[data-cy="saveSettingsBtn"]').click(); + cy.wait('@saveSettings'); + cy.wait('@loadSettings'); cy.clickNav('Subjects'); cy.get('[data-cy="manageBtn_subj2"]').should('exist') From b1d8d12b9395102b37974082a484f0882c1df255 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 07:09:46 -0400 Subject: [PATCH 04/11] #2460 - fix flaky text --- e2e-tests/cypress/e2e/quiz/question_def_management_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e-tests/cypress/e2e/quiz/question_def_management_spec.js b/e2e-tests/cypress/e2e/quiz/question_def_management_spec.js index 3a950d47cc..544276836e 100644 --- a/e2e-tests/cypress/e2e/quiz/question_def_management_spec.js +++ b/e2e-tests/cypress/e2e/quiz/question_def_management_spec.js @@ -614,6 +614,8 @@ describe('Quiz Question CRUD Tests', () => { cy.get('[data-cy="deleteQuestionButton_1"]') .tab() .type('{upArrow}'); + cy.wait('@patchQuestion') + cy.get('.spinner-border').should('not.exist') cy.validateElementsOrder('[data-cy="questionDisplayCard"]', ['question # 3', 'question # 2', 'question # 1']); // attempt to move the top item - should not change anything @@ -621,8 +623,6 @@ describe('Quiz Question CRUD Tests', () => { cy.get('[data-cy="btn_Questions"]') .tab() .type('{upArrow}'); - cy.wait('@patchQuestion') - cy.get('.spinner-border').should('not.exist') cy.validateElementsOrder('[data-cy="questionDisplayCard"]', ['question # 3', 'question # 2', 'question # 1']); cy.log("Reload") From ee26e26fcd31556cca9c91e02ae5ffb9989edf78 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 07:45:02 -0400 Subject: [PATCH 05/11] #2460 - fixed upload directory for image comparison diff files --- .github/workflows/build-and-test-oauth.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index 12b9e9aea1..33f5c29142 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -187,5 +187,4 @@ jobs: name: CI result artifacts path: | ./e2e-tests/logs - ./e2e-tests/cypress/snapshots/**/**/__diff_output__/*.png - ./e2e-tests/cypress/snapshots/**/__diff_output__/*.png + ./e2e-tests/cypress/visualRegression/diff From a80a3964c7eb6d2e483278d768edfc4c2d3eb169 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 09:04:21 -0400 Subject: [PATCH 06/11] #2460 - ignore project rank snapshots in OAuth mode --- .../client-display-theme_spec.js | 78 ++++++++++--------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/e2e-tests/cypress/e2e/client-display/client-display-theme_spec.js b/e2e-tests/cypress/e2e/client-display/client-display-theme_spec.js index b24f034e2d..cfe056c977 100644 --- a/e2e-tests/cypress/e2e/client-display/client-display-theme_spec.js +++ b/e2e-tests/cypress/e2e/client-display/client-display-theme_spec.js @@ -211,44 +211,46 @@ describe('Client Display Tests', () => { cy.matchSnapshotImage({ blackout: '[data-cy=pointHistoryChart]' }); }); - it(`test theming - project rank - ${size}`, () => { - cy.setResolution(size); - - cy.cdInitProjWithSkills(); - - const m = moment.utc('2020-09-12 11', 'YYYY-MM-DD HH'); - for (let i = 0; i < 5; i += 1) { - cy.request('POST', `/api/projects/proj1/skills/skill1`, { - userId: `uniqueUser${i}`, - timestamp: m.clone() - .add(1, 'day') - .format('x') - }); - cy.request('POST', `/api/projects/proj1/skills/skill1`, { - userId: `uniqueUser${i}`, - timestamp: m.clone() - .add(2, 'day') - .format('x') - }); - } - - cy.cdVisit('/?enableTheme=true&internalBackButton=true'); - - // back button - border color - cy.cdClickRank(); - // THEME: "pageTitleTextColor": "#fdfbfb", - cy.get('[data-cy=back]') - .should('have.css', 'border-color') - .and('equal', 'rgb(253, 251, 251)'); - cy.get('[data-cy=back]') - .should('have.css', 'color') - .and('equal', 'rgb(253, 251, 251)'); - - cy.contains('You are Level 2!'); - // wait for the bar (on the bar chart) to render - cy.get('[data-cy="levelBreakdownChart-animationEnded"]'); - cy.matchSnapshotImage({ blackout: '[data-cy=userFirstSeen]' }); - }); + if (!Cypress.env('oauthMode')) { + it(`test theming - project rank - ${size}`, () => { + cy.setResolution(size); + + cy.cdInitProjWithSkills(); + + const m = moment.utc('2020-09-12 11', 'YYYY-MM-DD HH'); + for (let i = 0; i < 5; i += 1) { + cy.request('POST', `/api/projects/proj1/skills/skill1`, { + userId: `uniqueUser${i}`, + timestamp: m.clone() + .add(1, 'day') + .format('x') + }); + cy.request('POST', `/api/projects/proj1/skills/skill1`, { + userId: `uniqueUser${i}`, + timestamp: m.clone() + .add(2, 'day') + .format('x') + }); + } + + cy.cdVisit('/?enableTheme=true&internalBackButton=true'); + + // back button - border color + cy.cdClickRank(); + // THEME: "pageTitleTextColor": "#fdfbfb", + cy.get('[data-cy=back]') + .should('have.css', 'border-color') + .and('equal', 'rgb(253, 251, 251)'); + cy.get('[data-cy=back]') + .should('have.css', 'color') + .and('equal', 'rgb(253, 251, 251)'); + + cy.contains('You are Level 2!'); + // wait for the bar (on the bar chart) to render + cy.get('[data-cy="levelBreakdownChart-animationEnded"]'); + cy.matchSnapshotImage({blackout: '[data-cy=userFirstSeen]'}); + }); + } it(`test theming - badge - ${size}`, () => { cy.setResolution(size); From eef88456b4471c1b3e8db489bb2eaa9ba6162ab5 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 09:17:06 -0400 Subject: [PATCH 07/11] #2460 - fix flaky text --- .../learning-path/learning_path_management_spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js index 2a016f7635..2bd102e4b3 100644 --- a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js +++ b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js @@ -395,7 +395,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="fullDepsSkillsGraph"]').contains('No Learning Path Yet') }) - it('Changing the From skill clears the To skill', () => { + it.only('Changing the From skill clears the To skill', () => { cy.visit('/administrator/projects/proj1/learning-path') // Add Badge1 as a prerequisite for Badge2 @@ -409,13 +409,13 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathToSkillSelector"]').contains('Badge 2'); cy.get('[data-cy="learningPathFromSkillSelector"]').click(); - cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').click(); + cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').click({ multiple: true }); cy.get('[data-cy="learningPathFromSkillSelector"]').contains('Very Great Skill 5 Subj2'); cy.get('[data-cy="learningPathToSkillSelector"]').should('have.value', ''); }) - it('Changing the From skill clears errors', () => { + it.only('Changing the From skill clears errors', () => { cy.visit('/administrator/projects/proj1/learning-path') // Add Badge1 as a prerequisite for Badge2 @@ -434,12 +434,12 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathError"]').contains('Badge 1 already exists in the learning path and adding it again will cause a circular/infinite learning path') cy.get('[data-cy="learningPathFromSkillSelector"]').click(); - cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').click(); + cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').click({ multiple: true }); cy.get('[data-cy="learningPathError"]').should('not.exist') }) - it('Changing the To skill clears errors', () => { + it.only('Changing the To skill clears errors', () => { cy.visit('/administrator/projects/proj1/learning-path') // Add Badge1 as a prerequisite for Badge2 @@ -452,7 +452,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathFromSkillSelector"]').click(); cy.get('[data-cy="skillsSelectionItem-proj1-badge2"]').click(); cy.get('[data-cy="learningPathToSkillSelector"]').click(); - cy.get('[data-cy="skillsSelectionItem-proj1-badge1"]').click(); + cy.get('[data-cy="skillsSelectionItem-proj1-badge1"]').click({ multiple: true }); cy.get('[data-cy="addLearningPathItemBtn"]').should('be.disabled') cy.get('[data-cy="learningPathError"]').contains('Badge 1 already exists in the learning path and adding it again will cause a circular/infinite learning path') From 8783eb34ee5a5c9ffc4742fd38f4e208bd903de1 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 09:45:55 -0400 Subject: [PATCH 08/11] #2460 - removed .only --- .../cypress/e2e/learning-path/learning_path_management_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js index 2bd102e4b3..a0eef7f2a8 100644 --- a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js +++ b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js @@ -439,7 +439,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathError"]').should('not.exist') }) - it.only('Changing the To skill clears errors', () => { + it('Changing the To skill clears errors', () => { cy.visit('/administrator/projects/proj1/learning-path') // Add Badge1 as a prerequisite for Badge2 From ecd6f0b10d0dac33d82104ad33abbe2f7b25a2d3 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 10:05:26 -0400 Subject: [PATCH 09/11] #2460 - removed .only --- .../e2e/learning-path/learning_path_management_spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js index a0eef7f2a8..36318c4348 100644 --- a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js +++ b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js @@ -395,7 +395,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="fullDepsSkillsGraph"]').contains('No Learning Path Yet') }) - it.only('Changing the From skill clears the To skill', () => { + it('Changing the From skill clears the To skill', () => { cy.visit('/administrator/projects/proj1/learning-path') // Add Badge1 as a prerequisite for Badge2 @@ -415,7 +415,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathToSkillSelector"]').should('have.value', ''); }) - it.only('Changing the From skill clears errors', () => { + it('Changing the From skill clears errors', () => { cy.visit('/administrator/projects/proj1/learning-path') // Add Badge1 as a prerequisite for Badge2 From f1b1c3917ce22e2a57c8c958d40258010ecb6923 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 11:50:30 -0400 Subject: [PATCH 10/11] #2460 - fix flaky text --- e2e-tests/cypress/e2e/accessibility/accessibility_specs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js b/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js index 80c0b2d2d0..ad83ca37eb 100644 --- a/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js +++ b/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js @@ -441,9 +441,9 @@ describe('Accessibility Tests', () => { cy.contains('No Levels Added Yet'); cy.customLighthouse(); + cy.wait('@getAvailableProjects') cy.get('#project-selector') .click(); - cy.wait('@getAvailableProjects') cy.get('#project-selector .vs__dropdown-option') .eq(0) .click(); From 13905da2274604f72221d1466b88964f5f7a278a Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 13:15:31 -0400 Subject: [PATCH 11/11] #2460 - fix flaky text --- .../e2e/learning-path/learning_path_management_spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js index 36318c4348..a580b4c168 100644 --- a/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js +++ b/e2e-tests/cypress/e2e/learning-path/learning_path_management_spec.js @@ -409,7 +409,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathToSkillSelector"]').contains('Badge 2'); cy.get('[data-cy="learningPathFromSkillSelector"]').click(); - cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').click({ multiple: true }); + cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').first().click(); cy.get('[data-cy="learningPathFromSkillSelector"]').contains('Very Great Skill 5 Subj2'); cy.get('[data-cy="learningPathToSkillSelector"]').should('have.value', ''); @@ -434,7 +434,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathError"]').contains('Badge 1 already exists in the learning path and adding it again will cause a circular/infinite learning path') cy.get('[data-cy="learningPathFromSkillSelector"]').click(); - cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').click({ multiple: true }); + cy.get('[data-cy="skillsSelectionItem-proj1-skill5Subj2"]').first().click(); cy.get('[data-cy="learningPathError"]').should('not.exist') }) @@ -452,7 +452,7 @@ describe('Learning Path Management Validation Tests', () => { cy.get('[data-cy="learningPathFromSkillSelector"]').click(); cy.get('[data-cy="skillsSelectionItem-proj1-badge2"]').click(); cy.get('[data-cy="learningPathToSkillSelector"]').click(); - cy.get('[data-cy="skillsSelectionItem-proj1-badge1"]').click({ multiple: true }); + cy.get('[data-cy="skillsSelectionItem-proj1-badge1"]').first().click(); cy.get('[data-cy="addLearningPathItemBtn"]').should('be.disabled') cy.get('[data-cy="learningPathError"]').contains('Badge 1 already exists in the learning path and adding it again will cause a circular/infinite learning path')