mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-28 15:08:51 +00:00
* rename org * add data-e2e * e2e test * restore state after * use ngIf instead of hasrole directive and initialized regex * rm h2 check * Update e2e/cypress/e2e/organization/organizations.cy.ts Co-authored-by: Elio Bischof <[email protected]> * Update console/src/assets/i18n/de.json Co-authored-by: Elio Bischof <[email protected]> * Update console/src/assets/i18n/de.json Co-authored-by: Elio Bischof <[email protected]> * Update console/src/assets/i18n/en.json Co-authored-by: Elio Bischof <[email protected]> * change e2e test * org param * reintroduct org param * use org query param * org rename test * no initial focus on button * contain name Co-authored-by: Elio Bischof <[email protected]>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { ensureOrgExists } from 'support/api/orgs';
|
|
import { apiAuth } from '../../support/api/apiauth';
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
const orgPath = `/org`;
|
|
|
|
const orgNameOnCreation = 'e2eorgrename';
|
|
const testOrgNameChange = uuidv4();
|
|
|
|
describe('organizations', () => {
|
|
describe('rename', () => {
|
|
beforeEach(() => {
|
|
apiAuth()
|
|
.as('api')
|
|
.then((api) => {
|
|
ensureOrgExists(api, orgNameOnCreation)
|
|
.as('newOrgId')
|
|
.then((newOrgId) => {
|
|
cy.visit(`${orgPath}?org=${newOrgId}`).as('orgsite');
|
|
});
|
|
});
|
|
});
|
|
|
|
it('should rename the organization', () => {
|
|
cy.get('[data-e2e="actions"]').click();
|
|
cy.get('[data-e2e="rename"]', { timeout: 1000 }).should('be.visible').click();
|
|
|
|
cy.get('[data-e2e="name"]').focus().clear().type(testOrgNameChange);
|
|
cy.get('[data-e2e="dialog-submit"]').click();
|
|
cy.get('.data-e2e-success');
|
|
cy.shouldNotExist({ selector: '.data-e2e-failure' });
|
|
cy.visit(orgPath);
|
|
cy.get('[data-e2e="top-view-title"').should('contain', testOrgNameChange);
|
|
});
|
|
});
|
|
|
|
it('should add an organization with the personal account as org owner');
|
|
describe('changing the current organization', () => {
|
|
it('should update displayed organization details');
|
|
});
|
|
});
|