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 <eliobischof@gmail.com>
This commit is contained in:
Max Peintner
2022-09-19 19:49:46 +02:00
committed by GitHub
parent 8505eb4cc9
commit fc4f4096e0
22 changed files with 522 additions and 526 deletions

View File

@@ -1,45 +1,38 @@
import { apiAuth } from "../../support/api/apiauth";
import { ensureHumanUserExists } from "../../support/api/users";
import { login, User } from "../../support/login/users";
import { apiAuth } from '../../support/api/apiauth';
import { ensureHumanUserExists } from '../../support/api/users';
import { login, User } from '../../support/login/users';
describe("login policy", ()=> {
describe('login policy', () => {
const orgPath = `/org`;
const orgPath = `/org`
;[User.OrgOwner].forEach(user => {
describe(`as user "${user}"`, () => {
beforeEach(()=> {
login(user)
cy.visit(orgPath)
// TODO: Why force?
cy.contains('[data-e2e="policy-card"]', 'Login Policy').contains('button', 'Modify').click({force: true}) // TODO: select data-e2e
apiAuth().then(api => {
ensureHumanUserExists(api, User.LoginPolicyUser)
})
})
// TODO: verify email
it.skip(`username and password disallowed`, () => {
login(User.LoginPolicyUser, "123abcABC?&*")
})
it(`registering is allowed`)
it(`registering is disallowed`)
it(`login by an external IDP is allowed`)
it(`login by an external IDP is disallowed`)
it(`MFA is forced`)
it(`MFA is not forced`)
it(`the password reset option is hidden`)
it(`the password reset option is shown`)
it(`passwordless login is allowed`)
it(`passwordless login is disallowed`)
describe('identity providers', () => {
})
})
})
})
[User.OrgOwner].forEach((user) => {
describe(`as user "${user}"`, () => {
beforeEach(() => {
login(user);
cy.visit(orgPath);
// TODO: Why force?
cy.contains('[data-e2e="policy-card"]', 'Login Policy').contains('button', 'Modify').click({ force: true }); // TODO: select data-e2e
apiAuth().then((api) => {
ensureHumanUserExists(api, User.LoginPolicyUser);
});
});
// TODO: verify email
it.skip(`username and password disallowed`, () => {
login(User.LoginPolicyUser, '123abcABC?&*');
});
it(`registering is allowed`);
it(`registering is disallowed`);
it(`login by an external IDP is allowed`);
it(`login by an external IDP is disallowed`);
it(`MFA is forced`);
it(`MFA is not forced`);
it(`the password reset option is hidden`);
it(`the password reset option is shown`);
it(`passwordless login is allowed`);
it(`passwordless login is disallowed`);
describe('identity providers', () => {});
});
});
});

View File

@@ -1,34 +1,29 @@
import { login, User } from "../../support/login/users";
import { login, User } from '../../support/login/users';
describe("password complexity", ()=> {
describe('password complexity', () => {
const orgPath = `/org`;
const testProjectName = 'e2eproject';
const orgPath = `/org`
const testProjectName = 'e2eproject'
;[User.OrgOwner].forEach(user => {
describe(`as user "${user}"`, () => {
beforeEach(()=> {
login(user)
cy.visit(orgPath)
// TODO: Why force?
cy.contains('[data-e2e="policy-card"]', 'Password Complexity').contains('button', 'Modify').click({force: true}) // TODO: select data-e2e
})
// TODO: fix saving password complexity policy bug
it(`should restrict passwords that don't have the minimal length`)
it(`should require passwords to contain a number if option is switched on`)
it(`should not require passwords to contain a number if option is switched off`)
it(`should require passwords to contain a symbol if option is switched on`)
it(`should not require passwords to contain a symbol if option is switched off`)
it(`should require passwords to contain a lowercase letter if option is switched on`)
it(`should not require passwords to contain a lowercase letter if option is switched off`)
it(`should require passwords to contain an uppercase letter if option is switched on`)
it(`should not require passwords to contain an uppercase letter if option is switched off`)
})
})
})
[User.OrgOwner].forEach((user) => {
describe(`as user "${user}"`, () => {
beforeEach(() => {
login(user);
cy.visit(orgPath);
// TODO: Why force?
cy.contains('[data-e2e="policy-card"]', 'Password Complexity').contains('button', 'Modify').click({ force: true }); // TODO: select data-e2e
});
// TODO: fix saving password complexity policy bug
it(`should restrict passwords that don't have the minimal length`);
it(`should require passwords to contain a number if option is switched on`);
it(`should not require passwords to contain a number if option is switched off`);
it(`should require passwords to contain a symbol if option is switched on`);
it(`should not require passwords to contain a symbol if option is switched off`);
it(`should require passwords to contain a lowercase letter if option is switched on`);
it(`should not require passwords to contain a lowercase letter if option is switched off`);
it(`should require passwords to contain an uppercase letter if option is switched on`);
it(`should not require passwords to contain an uppercase letter if option is switched off`);
});
});
});