mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 13:13:38 +00:00
feat(console): change default organization (#5151)
Adds the possibility to change the default organization from the organization overview
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ensureOrgExists } from 'support/api/orgs';
|
||||
import { ensureOrgExists, ensureOrgIsDefault, isDefaultOrg } from 'support/api/orgs';
|
||||
import { apiAuth } from '../../support/api/apiauth';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
@@ -33,6 +33,40 @@ describe('organizations', () => {
|
||||
});
|
||||
});
|
||||
|
||||
const orgOverviewPath = `/orgs`;
|
||||
const initialDefaultOrg = 'e2eorgolddefault';
|
||||
const orgNameForNewDefault = 'e2eorgnewdefault';
|
||||
|
||||
describe('set default org', () => {
|
||||
beforeEach(() => {
|
||||
apiAuth()
|
||||
.as('api')
|
||||
.then((api) => {
|
||||
ensureOrgExists(api, orgNameForNewDefault)
|
||||
.as('newDefaultOrgId')
|
||||
.then(() => {
|
||||
ensureOrgExists(api, initialDefaultOrg)
|
||||
.as('defaultOrg')
|
||||
.then((id) => {
|
||||
ensureOrgIsDefault(api, id)
|
||||
.as('orgWasDefault')
|
||||
.then(() => {
|
||||
cy.visit(`${orgOverviewPath}`).as('orgsite');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('should rename the organization', function () {
|
||||
const rowSelector = `tr:contains(${orgNameForNewDefault})`;
|
||||
cy.get(rowSelector).find('[data-e2e="table-actions-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="set-default-button"]', { timeout: 1000 }).should('be.visible').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
isDefaultOrg(this.api, this.newDefaultOrgId);
|
||||
});
|
||||
});
|
||||
|
||||
it('should add an organization with the personal account as org owner');
|
||||
describe('changing the current organization', () => {
|
||||
it('should update displayed organization details');
|
||||
|
Reference in New Issue
Block a user