mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-25 23:01:26 -05: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 <ojeytonwilliams@gmail.com> * feat: remove matrix and simplify Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
describe('User token widget on settings page,', function () {
|
|
describe('initially', function () {
|
|
beforeEach(() => {
|
|
cy.exec('npm run seed');
|
|
cy.login();
|
|
});
|
|
|
|
it('should not render', function () {
|
|
cy.visit('/settings');
|
|
// make sure 'Danger Zone' is there so we know the page has rendered
|
|
cy.contains('Danger Zone');
|
|
cy.get('[data-cy=user-token]').should('not.exist');
|
|
});
|
|
});
|
|
|
|
describe('after creating token', function () {
|
|
beforeEach(() => {
|
|
cy.exec('npm run seed');
|
|
cy.login();
|
|
cy.visit(
|
|
'/learn/relational-database/learn-bash-by-building-a-boilerplate/build-a-boilerplate'
|
|
);
|
|
cy.get('[data-cy=start-codeally]').click();
|
|
cy.get('[data-cy=codeally-frame]').should('be.visible');
|
|
});
|
|
|
|
it('should allow you to delete your token', () => {
|
|
cy.visit('/settings');
|
|
// make sure 'Danger Zone' is there so we know the page has rendered
|
|
cy.contains('Danger Zone');
|
|
cy.get('[data-cy=user-token]').should('have.length', 1);
|
|
|
|
cy.get('[data-cy=delete-user-token]').click();
|
|
cy.contains('Your user token has been deleted.');
|
|
cy.get('[data-cy=user-token]').should('not.exist');
|
|
});
|
|
});
|
|
});
|