mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-04-29 02:22:28 +00:00
Fix oauth cypress test
This commit is contained in:
parent
a856c4d6e1
commit
f4bd65dd2c
@ -50,18 +50,42 @@ describe('OAuth with Authentik', () => {
|
|||||||
|
|
||||||
it('Should log in with OAuth', function() {
|
it('Should log in with OAuth', function() {
|
||||||
cy.task('backendApiGet', {
|
cy.task('backendApiGet', {
|
||||||
token: token,
|
path: '/oauth/login?redirect_base=' + encodeURI(Cypress.config('baseUrl')),
|
||||||
path: '/oauth/login?redirect_base=' + encodeURI('http://fullstack:81'),
|
|
||||||
}).then((data) => {
|
}).then((data) => {
|
||||||
expect(data).to.have.property('result');
|
expect(data).to.have.property('result');
|
||||||
cy.visit(data.result);
|
cy.visit(data.result);
|
||||||
cy.get('input[name="uidField"]').type('cypress');
|
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('ak-flow-executor')
|
||||||
cy.get('input[name="password"]').type('fqXBfUYqHvYqiwBHWW7f');
|
.shadow()
|
||||||
cy.get('button[type="submit"]').click();
|
.find('ak-stage-identification')
|
||||||
// confirmation page
|
.shadow()
|
||||||
cy.get('button[type="submit"]').click();
|
.find('input[name="uidField"]', { visible: true })
|
||||||
cy.url().should('match', /fullstack/)
|
.type('cypress');
|
||||||
|
|
||||||
|
cy.get('ak-flow-executor')
|
||||||
|
.shadow()
|
||||||
|
.find('ak-stage-identification')
|
||||||
|
.shadow()
|
||||||
|
.find('button[type="submit"]', { visible: true })
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.get('ak-flow-executor')
|
||||||
|
.shadow()
|
||||||
|
.find('ak-stage-password')
|
||||||
|
.shadow()
|
||||||
|
.find('input[name="password"]', { visible: true })
|
||||||
|
.type('fqXBfUYqHvYqiwBHWW7f');
|
||||||
|
|
||||||
|
cy.get('ak-flow-executor')
|
||||||
|
.shadow()
|
||||||
|
.find('ak-stage-password')
|
||||||
|
.shadow()
|
||||||
|
.find('button[type="submit"]', { visible: true })
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.get('#root p.chakra-text')
|
||||||
|
.first()
|
||||||
|
.should('have.text', 'Nginx Proxy Manager');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "test",
|
"name": "npmtestsuite",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user