Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(console): always display create org button #5746

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/console/src/pages/Organizations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function Organizations({ tab }: Props) {
targetBlank: 'noopener',
}}
/>
{!isInitialSetup && (
{(!isInitialSetup || isDevFeaturesEnabled) && (
<Button
icon={<Plus />}
type="primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
// 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.start();
await expectOrg.gotoPage('/organizations', 'Organizations');
await expectOrg.toExpectTabs('Organizations', 'Settings');
});

it('should be able to see the table', async () => {
Expand Down Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\/.+$/);
}

Expand Down
Loading