Skip to content

Commit

Permalink
#2460 - ignore project rank snapshots in OAuth mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmayo committed Oct 26, 2023
1 parent ee26e26 commit a80a396
Showing 1 changed file with 40 additions and 38 deletions.
78 changes: 40 additions & 38 deletions e2e-tests/cypress/e2e/client-display/client-display-theme_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a80a396

Please sign in to comment.