mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-28 11:40:04 +00:00
Added a simple UI cypress test, improvements to ui menu
This commit is contained in:
@@ -3,19 +3,15 @@
|
||||
describe('Setup Phase', () => {
|
||||
|
||||
before(() => {
|
||||
cy.task('backendApiDelete', {
|
||||
path: '/api/users'
|
||||
}).then((data) => {
|
||||
expect(data).to.have.property('result', true);
|
||||
});
|
||||
cy.resetUsers();
|
||||
});
|
||||
|
||||
it('Should not be able to get a token', function() {
|
||||
it('Should NOT be able to get a token', function() {
|
||||
cy.task('backendApiPost', {
|
||||
path: '/api/tokens',
|
||||
data: {
|
||||
type: 'password',
|
||||
identity: 'jc@jc21.com',
|
||||
identity: 'cypress@example.com',
|
||||
secret: 'changeme'
|
||||
},
|
||||
returnOnError: true
|
||||
|
20
test/cypress/integration/ui/SetupLogin.spec.js
Normal file
20
test/cypress/integration/ui/SetupLogin.spec.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/// <reference types="Cypress" />
|
||||
|
||||
describe('UI Setup and Login', () => {
|
||||
|
||||
// Clear the users before runing this test
|
||||
before(() => {
|
||||
cy.resetUsers();
|
||||
});
|
||||
|
||||
it('Should be able to setup a new user', function() {
|
||||
cy.visit('/');
|
||||
cy.get('input[name="name"]').type('Cypress McGee');
|
||||
cy.get('input[name="nickname"]').type('Cypress');
|
||||
cy.get('input[name="email"]').type('cypress@example.com');
|
||||
cy.get('input[name="password"]').type('changeme');
|
||||
cy.get('form button:first').click();
|
||||
cy.get('.navbar-nav .avatar').should('be.visible');
|
||||
});
|
||||
|
||||
});
|
Reference in New Issue
Block a user