Skip to content

Commit

Permalink
tests: more explicit test assertions in settingsPreferencesPage.cy.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
GresilleSiffle committed Dec 19, 2024
1 parent ab65e38 commit 9ebc727
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/cypress/e2e/frontend/settingsPreferencesPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ describe('Settings - preferences page', () => {
cy.get(videosForYouDateSelector).click();
cy.contains('All time').click();

cy.get('[data-testid=videos_feed_foryou__unsafe]').should('not.be.checked');
cy.contains('Update preferences').click();

cy.visit('/feed/foryou');
Expand All @@ -343,7 +344,7 @@ describe('Settings - preferences page', () => {
cy.get(videosForYouDateSelector).click();
cy.contains('All time').click();

cy.get('[data-testid=videos_feed_foryou__unsafe]').click();
cy.get('[data-testid=videos_feed_foryou__unsafe]').check();
cy.contains('Update preferences').click();

cy.visit('/feed/foryou');
Expand Down Expand Up @@ -375,7 +376,7 @@ describe('Settings - preferences page', () => {
cy.wait('@settingsRetrievedFromAPI');
cy.get(videosForYouDateSelector).click();
cy.contains('All time').click();
cy.get('[data-testid=videos_feed_foryou__exclude_compared_entities]').click();
cy.get('[data-testid=videos_feed_foryou__exclude_compared_entities]').uncheck();
cy.contains('Update preferences').click();

cy.visit('/feed/foryou');
Expand Down Expand Up @@ -424,7 +425,8 @@ describe('Settings - preferences page', () => {
cy.wait('@settingsRetrievedFromAPI');
cy.get(videosForYouDateSelector).click();
cy.contains('All time').click();
cy.get('[data-testid=videos_feed_foryou__exclude_compared_entities]');
cy.get('[data-testid=videos_feed_foryou__exclude_compared_entities]')
.should('be.checked');
cy.contains('Update preferences').click();

cy.visit('/feed/foryou');
Expand Down

0 comments on commit 9ebc727

Please sign in to comment.