mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 08:47:32 +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 <eliobischof@gmail.com>
This commit is contained in:
@@ -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', () => {});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -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`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user