mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -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',
|
targetBlank: 'noopener',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{!isInitialSetup && (
|
{(!isInitialSetup || isDevFeaturesEnabled) && (
|
||||||
<Button
|
<Button
|
||||||
icon={<Plus />}
|
icon={<Plus />}
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
@ -3,12 +3,12 @@ import { cls, dcls, generateTestName } from '#src/utils.js';
|
||||||
|
|
||||||
const expectOrg = new ExpectOrganizations(await browser.newPage());
|
const expectOrg = new ExpectOrganizations(await browser.newPage());
|
||||||
|
|
||||||
// Temporarily skipping organization tests, will add them back later with the "guide" feature
|
// Start the test by signing in or starting the console
|
||||||
describe.skip('organizations: create, edit, and delete organization', () => {
|
await expectOrg.start();
|
||||||
|
|
||||||
|
describe('organizations: create, edit, and delete organization', () => {
|
||||||
it('navigates to organizations page', async () => {
|
it('navigates to organizations page', async () => {
|
||||||
await expectOrg.start();
|
|
||||||
await expectOrg.gotoPage('/organizations', 'Organizations');
|
await expectOrg.gotoPage('/organizations', 'Organizations');
|
||||||
await expectOrg.toExpectTabs('Organizations', 'Settings');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to see the table', async () => {
|
it('should be able to see the table', async () => {
|
||||||
|
@ -40,18 +40,17 @@ describe.skip('organizations: create, edit, and delete organization', () => {
|
||||||
undefined,
|
undefined,
|
||||||
false
|
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.toExpectModal('Reminder');
|
||||||
await expectOrg.toClick(['.ReactModalPortal', `button${cls('danger')}`].join(' '), 'Delete');
|
await expectOrg.toClick(['.ReactModalPortal', `button${cls('danger')}`].join(' '), 'Delete');
|
||||||
expectOrg.toMatchUrl(/\/organizations$/);
|
expectOrg.toMatchUrl(/\/organizations$/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.skip('organizations: search organization', () => {
|
describe('organizations: search organization', () => {
|
||||||
const [testName1, testName2] = [generateTestName(), generateTestName()];
|
const [testName1, testName2] = [generateTestName(), generateTestName()];
|
||||||
|
|
||||||
it('creates two organizations', async () => {
|
it('creates two organizations', async () => {
|
||||||
await expectOrg.start();
|
|
||||||
await expectOrg.toCreateOrganization(testName1);
|
await expectOrg.toCreateOrganization(testName1);
|
||||||
await expectOrg.toCreateOrganization(testName2);
|
await expectOrg.toCreateOrganization(testName2);
|
||||||
await expectOrg.gotoPage('/organizations', 'Organizations');
|
await expectOrg.gotoPage('/organizations', 'Organizations');
|
||||||
|
|
|
@ -12,13 +12,13 @@ export default class ExpectOrganizations extends ExpectConsole {
|
||||||
*/
|
*/
|
||||||
async toCreateOrganization(name: string) {
|
async toCreateOrganization(name: string) {
|
||||||
await this.gotoPage('/organizations', 'Organizations');
|
await this.gotoPage('/organizations', 'Organizations');
|
||||||
await this.toClickButton('Create organization');
|
await this.toClickButton('Create organization', false);
|
||||||
|
|
||||||
await this.toExpectModal('Create organization');
|
await this.toExpectModal('Create organization');
|
||||||
await this.toFillForm({
|
await this.toFillForm({
|
||||||
name,
|
name,
|
||||||
});
|
});
|
||||||
await this.toClick(['.ReactModalPortal', `button${cls('primary')}`].join(' '), 'Create', false);
|
await this.toClick(['.ReactModalPortal', `button${cls('primary')}`].join(' '), 'Create');
|
||||||
this.toMatchUrl(/\/organizations\/.+$/);
|
this.toMatchUrl(/\/organizations\/.+$/);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue