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:
Tom
2022-03-11 15:58:23 -06:00
committed by GitHub
parent 692605de3a
commit 9e5f9b2a7c
24 changed files with 370 additions and 434 deletions

View 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.');
});
});
});