From c9efa621479958845bc914a9f6505476e6ac1762 Mon Sep 17 00:00:00 2001 From: jq1836 <95712150+jq1836@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:45:50 +0800 Subject: [PATCH 1/2] Fix Cypress test on local environment --- .../tests/chartView/chartView_zoomFeature.cy.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js index 0ee3010da1..0ad098aee7 100644 --- a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js +++ b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js @@ -289,7 +289,8 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('#tab-zoom .ramp .ramp__slice') .first() .invoke('attr', 'title') - .should('eq', '[2020-10-01] [#1312] Conditional run for markbind to gh pages deployment (#1337): +1 -0 lines '); + .should('eq', '[2020-11-21] [#1345] Authorship: Add last modified date to each LoC if specified ' + + '(#1348): +165 -76 lines '); cy.get('#tab-zoom .ramp .ramp__slice') .last() .invoke('attr', 'title') @@ -319,8 +320,8 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('#tab-zoom .ramp .ramp__slice') .last() .invoke('attr', 'title') - .should('eq', '[2020-11-21] [#1345] Authorship: Add last modified ' - + 'date to each LoC if specified (#1348): +165 -76 lines '); + .should('eq', '[2020-12-18] [#1374] Travis: utilise latest node version for PR docs deployment ' + + '(#1381): +4 -0 lines '); }); // Assumptions: Contributer 'jamessspanggg' is the first result, @@ -351,7 +352,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('#tab-zoom .ramp .ramp__slice') .last() .invoke('attr', 'title') - .should('eq', '[2020-11-21] [#1345] Authorship: Add last modified date ' - + 'to each LoC if specified (#1348): +165 -76 lines '); + .should('eq', '[2020-12-18] [#1374] Travis: utilise latest node version for PR docs deployment ' + + '(#1381): +4 -0 lines '); }); }); From 5c3d166feacddc00a8582b60fa6b893acb73048a Mon Sep 17 00:00:00 2001 From: jq1836 <95712150+jq1836@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:18:10 +0800 Subject: [PATCH 2/2] Fix Cypress test for GitHub actions --- .../tests/chartView/chartView_zoomFeature.cy.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js index 0ad098aee7..5915db587e 100644 --- a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js +++ b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js @@ -281,7 +281,7 @@ describe('range changes in chartview should reflect in zoom', () => { .get('#summary-charts .summary-chart__ramp .ramp') .first() .click(120, 20) - .click(200, 20); + .click(185, 20); cy.get('#tab-zoom') .should('be.visible'); @@ -289,8 +289,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('#tab-zoom .ramp .ramp__slice') .first() .invoke('attr', 'title') - .should('eq', '[2020-11-21] [#1345] Authorship: Add last modified date to each LoC if specified ' - + '(#1348): +165 -76 lines '); + .should('eq', '[2020-05-23] [#1241] Restore checked file types (#1256): +14 -1 lines '); cy.get('#tab-zoom .ramp .ramp__slice') .last() .invoke('attr', 'title') @@ -307,7 +306,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('body').type(zoomKey, { release: false }) .get('#summary-charts .summary-chart__ramp .ramp') .first() - .click(200, 20) + .click(185, 20) .click(250, 20); cy.get('#tab-zoom') @@ -320,8 +319,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('#tab-zoom .ramp .ramp__slice') .last() .invoke('attr', 'title') - .should('eq', '[2020-12-18] [#1374] Travis: utilise latest node version for PR docs deployment ' - + '(#1381): +4 -0 lines '); + .should('eq', '[2020-09-27] Add optional check for quotes in diff file regex (#1330): +1 -1 lines '); }); // Assumptions: Contributer 'jamessspanggg' is the first result, @@ -335,7 +333,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('body').type(zoomKey, { release: false }) .get('#summary-charts .summary-chart__ramp .ramp') .first() - .click(200, 20) + .click(185, 20) .click(225, 20); cy.get('#tab-zoom') @@ -352,7 +350,6 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('#tab-zoom .ramp .ramp__slice') .last() .invoke('attr', 'title') - .should('eq', '[2020-12-18] [#1374] Travis: utilise latest node version for PR docs deployment ' - + '(#1381): +4 -0 lines '); + .should('eq', '[2020-09-27] Add optional check for quotes in diff file regex (#1330): +1 -1 lines '); }); });