mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
fix(console): always display create org button (#5746)
This commit is contained in:
parent
c1c746bca4
commit
c6adedefb5
3 changed files with 9 additions and 10 deletions
|
@ -81,7 +81,7 @@ function Organizations({ tab }: Props) {
|
|||
targetBlank: 'noopener',
|
||||
}}
|
||||
/>
|
||||
{!isInitialSetup && (
|
||||
{(!isInitialSetup || isDevFeaturesEnabled) && (
|
||||
<Button
|
||||
icon={<Plus />}
|
||||
type="primary"
|
||||
|
|
|
@ -3,12 +3,12 @@ import { cls, dcls, generateTestName } from '#src/utils.js';
|
|||
|
||||
const expectOrg = new ExpectOrganizations(await browser.newPage());
|
||||
|
||||
// Temporarily skipping organization tests, will add them back later with the "guide" feature
|
||||
describe.skip('organizations: create, edit, and delete organization', () => {
|
||||
it('navigates to organizations page', async () => {
|
||||
// Start the test by signing in or starting the console
|
||||
await expectOrg.start();
|
||||
|
||||
describe('organizations: create, edit, and delete organization', () => {
|
||||
it('navigates to organizations page', async () => {
|
||||
await expectOrg.gotoPage('/organizations', 'Organizations');
|
||||
await expectOrg.toExpectTabs('Organizations', 'Settings');
|
||||
});
|
||||
|
||||
it('should be able to see the table', async () => {
|
||||
|
@ -40,18 +40,17 @@ describe.skip('organizations: create, edit, and delete organization', () => {
|
|||
undefined,
|
||||
false
|
||||
);
|
||||
await expectOrg.toClick(`${dcls('danger')}[role=menuitem]`, 'Delete organization', false);
|
||||
await expectOrg.toClick(`${dcls('danger')}[role=menuitem]`, 'Delete', false);
|
||||
await expectOrg.toExpectModal('Reminder');
|
||||
await expectOrg.toClick(['.ReactModalPortal', `button${cls('danger')}`].join(' '), 'Delete');
|
||||
expectOrg.toMatchUrl(/\/organizations$/);
|
||||
});
|
||||
});
|
||||
|
||||
describe.skip('organizations: search organization', () => {
|
||||
describe('organizations: search organization', () => {
|
||||
const [testName1, testName2] = [generateTestName(), generateTestName()];
|
||||
|
||||
it('creates two organizations', async () => {
|
||||
await expectOrg.start();
|
||||
await expectOrg.toCreateOrganization(testName1);
|
||||
await expectOrg.toCreateOrganization(testName2);
|
||||
await expectOrg.gotoPage('/organizations', 'Organizations');
|
||||
|
|
|
@ -12,13 +12,13 @@ export default class ExpectOrganizations extends ExpectConsole {
|
|||
*/
|
||||
async toCreateOrganization(name: string) {
|
||||
await this.gotoPage('/organizations', 'Organizations');
|
||||
await this.toClickButton('Create organization');
|
||||
await this.toClickButton('Create organization', false);
|
||||
|
||||
await this.toExpectModal('Create organization');
|
||||
await this.toFillForm({
|
||||
name,
|
||||
});
|
||||
await this.toClick(['.ReactModalPortal', `button${cls('primary')}`].join(' '), 'Create', false);
|
||||
await this.toClick(['.ReactModalPortal', `button${cls('primary')}`].join(' '), 'Create');
|
||||
this.toMatchUrl(/\/organizations\/.+$/);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue