mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-16 21:06:35 +08:00
* feat: add stripe donate page test for non donors * fix: revert changes to see if ev is passed correctly * feat: download artifacts * fix: add quotations for spec args with global patterns * fix: remove firefox from cypress donation tests * fix: trigger action on main push * Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <[email protected]> * feat: remove matrix and simplify Co-authored-by: Oliver Eyton-Williams <[email protected]>
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
describe('Email input field', () => {
|
|
beforeEach(() => {
|
|
cy.exec('npm run seed');
|
|
cy.login();
|
|
cy.visit('/settings');
|
|
});
|
|
|
|
it('Should be possible to submit the new email', () => {
|
|
cy.get('[id=new-email]')
|
|
.type('[email protected]')
|
|
.should('have.attr', 'value', '[email protected]');
|
|
|
|
cy.get('[id=confirm-email]')
|
|
.type('[email protected]')
|
|
.should('have.attr', 'value', '[email protected]');
|
|
|
|
cy.get('[id=form-update-email]').within(() => {
|
|
cy.contains('Save').click();
|
|
});
|
|
cy.contains(
|
|
'Check your email and click the link we sent you to confirm your new email address.'
|
|
);
|
|
});
|
|
|
|
it('Displays an error message when there are problems with the submitted emails', () => {
|
|
cy.get('[id=new-email]').type('[email protected]');
|
|
cy.get('[id=confirm-email]').type('[email protected]');
|
|
|
|
cy.get('[class=help-block]').contains(
|
|
'Both new email addresses must be the same'
|
|
);
|
|
|
|
cy.get('[id=new-email]').clear().type('[email protected]');
|
|
|
|
cy.get('[class=help-block]').contains(
|
|
'This email is the same as your current email'
|
|
);
|
|
});
|
|
|
|
it('Should be possible to get Quincys weekly email', () => {
|
|
cy.contains('Yes please').click();
|
|
});
|
|
});
|