Skip to content

Commit

Permalink
fix(tests): Migrate 2 tests from Webdriver to Cypress (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Salayna committed Aug 25, 2020
1 parent c1083b2 commit 36451d9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cypress/integration/email-notification.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
context('reduce frequency of email notifications', () => {
it('user has instant email notifications', () => {
cy.loginAsAdmin();
cy.request('api/user').should(response => {
expect(response.body)
.to.have.property('pref')
.to.have.property('emSub', 0);
});
});

it('user activates daily email notifications', () => {
cy.loginAsAdmin();
cy.visit('/settings');
cy.get('a')
.contains('Notifications')
.click();
cy.get('label')
.contains('Daily')
.click();
cy.get('#tabNotif input[type="submit"]').click();
cy.request('api/user').should(response => {
expect(response.body)
.to.have.property('pref')
.to.have.property('emSub', '1');
});
});
});

0 comments on commit 36451d9

Please sign in to comment.