mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
ci(e2e): firefox (#4310)
fix: remove unnecessary cypress get Co-authored-by: Elio Bischof <eliobischof@gmail.com>
This commit is contained in:
parent
4723e911f4
commit
3a643d87b3
@ -1,42 +1,50 @@
|
|||||||
import { Apps, ensureProjectExists, ensureProjectResourceDoesntExist } from "../../support/api/projects";
|
import {
|
||||||
|
Apps,
|
||||||
|
ensureProjectExists,
|
||||||
|
ensureProjectResourceDoesntExist,
|
||||||
|
} from "../../support/api/projects";
|
||||||
import { apiAuth } from "../../support/api/apiauth";
|
import { apiAuth } from "../../support/api/apiauth";
|
||||||
|
|
||||||
describe('applications', () => {
|
describe("applications", () => {
|
||||||
|
const testProjectName = "e2eprojectapplication";
|
||||||
|
const testAppName = "e2eappundertest";
|
||||||
|
|
||||||
const testProjectName = 'e2eprojectapplication'
|
beforeEach(`ensure it doesn't exist already`, () => {
|
||||||
const testAppName = 'e2eappundertest'
|
apiAuth().then((api) => {
|
||||||
|
ensureProjectExists(api, testProjectName).then((projectID) => {
|
||||||
|
ensureProjectResourceDoesntExist(
|
||||||
|
api,
|
||||||
|
projectID,
|
||||||
|
Apps,
|
||||||
|
testAppName
|
||||||
|
).then(() => {
|
||||||
|
cy.visit(`/projects/${projectID}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
beforeEach(`ensure it doesn't exist already`, () => {
|
it("add app", () => {
|
||||||
apiAuth().then(api => {
|
cy.get('[data-e2e="app-card-add"]').should("be.visible").click();
|
||||||
ensureProjectExists(api, testProjectName).then(projectID => {
|
// select webapp
|
||||||
ensureProjectResourceDoesntExist(api, projectID, Apps, testAppName).then(() => {
|
cy.get('[formcontrolname="name"]').type(testAppName);
|
||||||
cy.visit(`/projects/${projectID}`)
|
cy.get('[for="WEB"]').click();
|
||||||
})
|
cy.get('[data-e2e="continue-button-nameandtype"]').click();
|
||||||
})
|
//select authentication
|
||||||
})
|
cy.get('[for="PKCE"]').click();
|
||||||
})
|
cy.get('[data-e2e="continue-button-authmethod"]').click();
|
||||||
|
//enter URL
|
||||||
it('add app', () => {
|
cy.get("cnsl-redirect-uris").eq(0).type("https://testurl.org");
|
||||||
cy.get('mat-spinner')
|
cy.get("cnsl-redirect-uris").eq(1).type("https://testlogouturl.org");
|
||||||
cy.get('mat-spinner').should('not.exist')
|
cy.get('[data-e2e="continue-button-redirecturis"]').click();
|
||||||
cy.get('[data-e2e="app-card-add"]').should('be.visible').click()
|
cy.get('[data-e2e="create-button"]')
|
||||||
// select webapp
|
.click()
|
||||||
cy.get('[formcontrolname="name"]').type(testAppName)
|
.then(() => {
|
||||||
cy.get('[for="WEB"]').click()
|
cy.get("[id*=overlay]").should("exist");
|
||||||
cy.get('[data-e2e="continue-button-nameandtype"]').click()
|
});
|
||||||
//select authentication
|
cy.get(".data-e2e-success");
|
||||||
cy.get('[for="PKCE"]').click()
|
cy.wait(200);
|
||||||
cy.get('[data-e2e="continue-button-authmethod"]').click()
|
cy.get(".data-e2e-failure", { timeout: 0 }).should("not.exist");
|
||||||
//enter URL
|
//TODO: check client ID/Secret
|
||||||
cy.get('cnsl-redirect-uris').eq(0).type("https://testurl.org")
|
});
|
||||||
cy.get('cnsl-redirect-uris').eq(1).type("https://testlogouturl.org")
|
});
|
||||||
cy.get('[data-e2e="continue-button-redirecturis"]').click()
|
|
||||||
cy.get('[data-e2e="create-button"]').click().then(() => {
|
|
||||||
cy.get('[id*=overlay]').should('exist')
|
|
||||||
})
|
|
||||||
cy.get('.data-e2e-success')
|
|
||||||
cy.wait(200)
|
|
||||||
cy.get('.data-e2e-failure', { timeout: 0 }).should('not.exist')
|
|
||||||
//TODO: check client ID/Secret
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
Loading…
Reference in New Issue
Block a user