mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 08:56:50 +00:00
CI stack for Authentik with ldap
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Certificates endpoints', () => {
|
||||
let token;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Full Certificate Provisions', () => {
|
||||
let token;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Basic API checks', () => {
|
||||
it('Should return a valid health payload', function() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
// Settings are stored lowercase in the backend
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Setup Phase', () => {
|
||||
|
||||
@ -8,15 +8,15 @@ describe('Setup Phase', () => {
|
||||
|
||||
it('Should NOT be able to get a token', function() {
|
||||
cy.task('backendApiPost', {
|
||||
path: '/api/tokens',
|
||||
path: '/api/auth',
|
||||
data: {
|
||||
type: 'password',
|
||||
type: 'local',
|
||||
identity: 'cypress@example.com',
|
||||
secret: 'changeme'
|
||||
},
|
||||
returnOnError: true
|
||||
}).then((data) => {
|
||||
cy.validateSwaggerSchema('post', 403, '/tokens', data);
|
||||
cy.validateSwaggerSchema('post', 403, '/auth', data);
|
||||
expect(data.error).to.have.property('code', 403);
|
||||
expect(data.error).to.have.property('message', 'Not available during setup phase');
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Swagger Schema Checks', () => {
|
||||
it('Should be valid with swagger-validator', function() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Upstream endpoints', () => {
|
||||
let token;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('Users endpoints', () => {
|
||||
let token;
|
||||
@ -82,11 +82,10 @@ describe('Users endpoints', () => {
|
||||
path: '/api/users',
|
||||
data: {
|
||||
name: 'Example user 1',
|
||||
nickname: 'User1',
|
||||
email: uniqueEmail,
|
||||
is_disabled: false,
|
||||
auth: {
|
||||
type: 'password',
|
||||
type: 'local',
|
||||
secret: 'changeme'
|
||||
},
|
||||
capabilities: [
|
||||
@ -108,11 +107,10 @@ describe('Users endpoints', () => {
|
||||
returnOnError: true,
|
||||
data: {
|
||||
name: 'Example user 2',
|
||||
nickname: 'User2',
|
||||
email: uniqueEmail,
|
||||
is_disabled: false,
|
||||
auth: {
|
||||
type: 'password',
|
||||
type: 'local',
|
||||
secret: 'changeme'
|
||||
},
|
||||
capabilities: [
|
||||
|
@ -1,4 +1,4 @@
|
||||
/// <reference types="Cypress" />
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe('UI Setup and Login', () => {
|
||||
|
||||
@ -10,7 +10,6 @@ describe('UI Setup and Login', () => {
|
||||
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:last').click();
|
||||
|
@ -66,7 +66,7 @@ Cypress.Commands.add('getToken', (defaultUser, defaultAuth) => {
|
||||
});
|
||||
} else {
|
||||
let auth = {
|
||||
type: 'password',
|
||||
type: 'local',
|
||||
identity: 'cypress@example.com',
|
||||
secret: 'changeme',
|
||||
};
|
||||
@ -78,7 +78,7 @@ Cypress.Commands.add('getToken', (defaultUser, defaultAuth) => {
|
||||
cy.log('Setup = true');
|
||||
// login with existing user
|
||||
cy.task('backendApiPost', {
|
||||
path: '/api/tokens',
|
||||
path: '/api/auth',
|
||||
data: auth,
|
||||
}).then((res) => {
|
||||
cy.wrap(res.result.token);
|
||||
@ -90,11 +90,10 @@ Cypress.Commands.add('getToken', (defaultUser, defaultAuth) => {
|
||||
Cypress.Commands.add('createInitialUser', (defaultUser) => {
|
||||
let user = {
|
||||
name: 'Cypress McGee',
|
||||
nickname: 'Cypress',
|
||||
email: 'cypress@example.com',
|
||||
is_disabled: false,
|
||||
auth: {
|
||||
type: 'password',
|
||||
type: 'local',
|
||||
secret: 'changeme'
|
||||
},
|
||||
capabilities: ['full-admin']
|
||||
|
Reference in New Issue
Block a user