diff --git a/test/cypress/e2e/api/OAuth.cy.js b/test/cypress/e2e/api/OAuth.cy.js index 06ebd924..912c3b64 100644 --- a/test/cypress/e2e/api/OAuth.cy.js +++ b/test/cypress/e2e/api/OAuth.cy.js @@ -53,9 +53,10 @@ describe('OAuth with Authentik', () => { path: '/oauth/login?redirect_base=' + encodeURI(Cypress.config('baseUrl')), }).then((data) => { expect(data).to.have.property('result'); - cy.visit(data.result); - cy.get('ak-flow-executor') + cy.origin('http://authentik:9000', {args: data.result}, (url) => { + cy.visit(url); + cy.get('ak-flow-executor') .shadow() .find('ak-stage-identification') .shadow() @@ -82,10 +83,15 @@ describe('OAuth with Authentik', () => { .shadow() .find('button[type="submit"]', { visible: true }) .click(); + }) + // we should be logged in cy.get('#root p.chakra-text') .first() .should('have.text', 'Nginx Proxy Manager'); + + // logout: + cy.clearLocalStorage(); }); }); } diff --git a/test/cypress/e2e/ui/SetupLogin.cy.js b/test/cypress/e2e/ui/SetupLogin.cy.js index a60fa85a..bd8cd50f 100644 --- a/test/cypress/e2e/ui/SetupLogin.cy.js +++ b/test/cypress/e2e/ui/SetupLogin.cy.js @@ -14,8 +14,9 @@ describe('UI Setup and Login', () => { cy.get('input[name="password"]').type('changeme'); cy.get('form button:last').click(); - // To fix after chakra change: - // cy.get('.navbar-nav .avatar').should('be.visible'); + cy.get('#root p.chakra-text') + .first() + .should('have.text', 'Nginx Proxy Manager'); // logout: cy.clearLocalStorage();