From a80a3964c7eb6d2e483278d768edfc4c2d3eb169 Mon Sep 17 00:00:00 2001 From: rmmayo Date: Thu, 26 Oct 2023 09:04:21 -0400 Subject: [PATCH] #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);