mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-18 19:25:13 +00:00
* add specs that cover the b2b demo * update cypress * test handling manager roles * use shared mocha contexts * use beforeEach instead of before * improve readability * improve application test * remove static waits * remove old awaitDesired * test owned project authorizations * simplify ensure.ts * test granted projects authz * disable prevSubject for shouldNotExist * await non-existence, then expect no error * update dependencies * fix tests from scratch * fix settings tests from scratch * Apply suggestions from code review Co-authored-by: Max Peintner <[email protected]> * Implement code review suggestions * use spread operator * settings properties must match * add check settings object * revert spread operator Co-authored-by: Max Peintner <[email protected]>
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import { apiAuth } from '../../support/api/apiauth';
|
|
import { ensureOIDCSettingsSet } from '../../support/api/oidc-settings';
|
|
|
|
describe('oidc settings', () => {
|
|
const oidcSettingsPath = `/settings?id=oidc`;
|
|
const accessTokenPrecondition = 1;
|
|
const idTokenPrecondition = 2;
|
|
const refreshTokenExpirationPrecondition = 7;
|
|
const refreshTokenIdleExpirationPrecondition = 2;
|
|
|
|
beforeEach(`ensure they are set`, () => {
|
|
apiAuth().then((apiCallProperties) => {
|
|
ensureOIDCSettingsSet(
|
|
apiCallProperties,
|
|
accessTokenPrecondition,
|
|
idTokenPrecondition,
|
|
refreshTokenExpirationPrecondition,
|
|
refreshTokenIdleExpirationPrecondition,
|
|
);
|
|
cy.visit(oidcSettingsPath);
|
|
});
|
|
});
|
|
|
|
it(`should update oidc settings`, () => {
|
|
cy.get('[formcontrolname="accessTokenLifetime"]').should('value', accessTokenPrecondition).clear().type('2');
|
|
cy.get('[formcontrolname="idTokenLifetime"]').should('value', idTokenPrecondition).clear().type('24');
|
|
cy.get('[formcontrolname="refreshTokenExpiration"]')
|
|
.should('value', refreshTokenExpirationPrecondition)
|
|
.clear()
|
|
.type('30');
|
|
cy.get('[formcontrolname="refreshTokenIdleExpiration"]')
|
|
.should('value', refreshTokenIdleExpirationPrecondition)
|
|
.clear()
|
|
.type('7');
|
|
cy.get('[data-e2e="save-button"]').click();
|
|
cy.get('.data-e2e-success');
|
|
});
|
|
});
|