mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 10:28:52 +00:00
chore(e2e): formatting with prettier (#4385)
* prettier in e2e * format * typescript as dev dependency * ci all, check linting * resolve liniting issues * fix wait-on * fix package-lock.json Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
co-authored by
Elio Bischof
parent
8505eb4cc9
commit
fc4f4096e0
@@ -1,15 +1,12 @@
|
||||
import { apiAuth } from "../../support/api/apiauth";
|
||||
import {
|
||||
ensureProjectDoesntExist,
|
||||
ensureProjectExists,
|
||||
} from "../../support/api/projects";
|
||||
import { apiAuth } from '../../support/api/apiauth';
|
||||
import { ensureProjectDoesntExist, ensureProjectExists } from '../../support/api/projects';
|
||||
|
||||
describe("projects", () => {
|
||||
const testProjectNameCreate = "e2eprojectcreate";
|
||||
const testProjectNameDeleteList = "e2eprojectdeletelist";
|
||||
const testProjectNameDeleteGrid = "e2eprojectdeletegrid";
|
||||
describe('projects', () => {
|
||||
const testProjectNameCreate = 'e2eprojectcreate';
|
||||
const testProjectNameDeleteList = 'e2eprojectdeletelist';
|
||||
const testProjectNameDeleteGrid = 'e2eprojectdeletegrid';
|
||||
|
||||
describe("add project", () => {
|
||||
describe('add project', () => {
|
||||
beforeEach(`ensure it doesn't exist already`, () => {
|
||||
apiAuth().then((api) => {
|
||||
ensureProjectDoesntExist(api, testProjectNameCreate);
|
||||
@@ -17,60 +14,56 @@ describe("projects", () => {
|
||||
cy.visit(`/projects`);
|
||||
});
|
||||
|
||||
it("should add a project", () => {
|
||||
cy.get(".add-project-button").click({ force: true });
|
||||
cy.get("input").type(testProjectNameCreate);
|
||||
it('should add a project', () => {
|
||||
cy.get('.add-project-button').click({ force: true });
|
||||
cy.get('input').type(testProjectNameCreate);
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get(".data-e2e-success");
|
||||
cy.get('.data-e2e-success');
|
||||
cy.wait(200);
|
||||
cy.get(".data-e2e-failure", { timeout: 0 }).should("not.exist");
|
||||
cy.get('.data-e2e-failure', { timeout: 0 }).should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe("remove project", () => {
|
||||
describe("list view", () => {
|
||||
beforeEach("ensure it exists", () => {
|
||||
describe('remove project', () => {
|
||||
describe('list view', () => {
|
||||
beforeEach('ensure it exists', () => {
|
||||
apiAuth().then((api) => {
|
||||
ensureProjectExists(api, testProjectNameDeleteList);
|
||||
});
|
||||
cy.visit(`/projects`);
|
||||
});
|
||||
|
||||
it("removes the project", () => {
|
||||
it('removes the project', () => {
|
||||
cy.get('[data-e2e="toggle-grid"]').click();
|
||||
cy.get('[data-e2e="timestamp"]');
|
||||
cy.contains("tr", testProjectNameDeleteList, { timeout: 1000 })
|
||||
cy.contains('tr', testProjectNameDeleteList, { timeout: 1000 })
|
||||
.find('[data-e2e="delete-project-button"]')
|
||||
.click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]')
|
||||
.focus()
|
||||
.type(testProjectNameDeleteList);
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type(testProjectNameDeleteList);
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.get(".data-e2e-success");
|
||||
cy.get('.data-e2e-success');
|
||||
cy.wait(200);
|
||||
cy.get(".data-e2e-failure", { timeout: 0 }).should("not.exist");
|
||||
cy.get('.data-e2e-failure', { timeout: 0 }).should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe("grid view", () => {
|
||||
beforeEach("ensure it exists", () => {
|
||||
describe('grid view', () => {
|
||||
beforeEach('ensure it exists', () => {
|
||||
apiAuth().then((api) => {
|
||||
ensureProjectExists(api, testProjectNameDeleteGrid);
|
||||
});
|
||||
cy.visit(`/projects`);
|
||||
});
|
||||
|
||||
it("removes the project", () => {
|
||||
it('removes the project', () => {
|
||||
cy.contains('[data-e2e="grid-card"]', testProjectNameDeleteGrid)
|
||||
.find('[data-e2e="delete-project-button"]')
|
||||
.click({force: true});
|
||||
cy.get('[data-e2e="confirm-dialog-input"]')
|
||||
.focus()
|
||||
.type(testProjectNameDeleteGrid);
|
||||
.click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type(testProjectNameDeleteGrid);
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.get(".data-e2e-success");
|
||||
cy.get('.data-e2e-success');
|
||||
cy.wait(200);
|
||||
cy.get(".data-e2e-failure", { timeout: 0 }).should("not.exist");
|
||||
cy.get('.data-e2e-failure', { timeout: 0 }).should('not.exist');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user