Skip to content

Commit

Permalink
test: add an e2e test for the exlude compared entities setting
Browse files Browse the repository at this point in the history
  • Loading branch information
GresilleSiffle committed Aug 8, 2023
1 parent d83ae72 commit 471836c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/cypress/e2e/frontend/settingsPreferencesPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,31 @@ describe('Settings - preferences page', () => {
);
});
});

describe('Setting - exclude compared entities', () => {
it('handles the value false (exclude)', () => {
cy.visit('/settings/preferences');
login();

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

cy.get('a[aria-label="Link to the recommendations page"]').should(
'have.attr', 'href', '/recommendations?date=Month'
);
});

it('handles the value true (include)', () => {
cy.visit('/settings/preferences');
login();

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

cy.get('a[aria-label="Link to the recommendations page"]').should(
'have.attr', 'href', '/recommendations?date=Month&advanced=exclude_compared'
);
});
});
});

0 comments on commit 471836c

Please sign in to comment.