fix: webhook process (#45385)
* fix: token rework functional fix: clean up fix: more clean up fix: more clean up fix: add widget back to settings fix: fix: fix: cypress Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> fix: use flash enum * chore: rename webhookToken -> userToken fix: add translations I forgot to save * fix: add missing tones for flash messages * fix: node test
This commit is contained in:
37
cypress/integration/settings/user-token.js
Normal file
37
cypress/integration/settings/user-token.js
Normal file
@ -0,0 +1,37 @@
|
||||
describe('User token widget on settings page,', function () {
|
||||
describe('initially', function () {
|
||||
before(() => {
|
||||
cy.exec('npm run seed');
|
||||
cy.login();
|
||||
cy.visit('/settings');
|
||||
});
|
||||
|
||||
it('should not render', function () {
|
||||
cy.contains('Danger Zone');
|
||||
cy.get('.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.contains('Click here to start the course').click();
|
||||
cy.wait(2000);
|
||||
cy.visit('/settings');
|
||||
});
|
||||
|
||||
it('should render', function () {
|
||||
cy.contains('Danger Zone');
|
||||
cy.get('.user-token').should('have.length', 1);
|
||||
});
|
||||
|
||||
it('should allow you to delete your token', function () {
|
||||
cy.contains('Delete my user token').click();
|
||||
cy.contains('Your user token has been deleted.');
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user