mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
860 B
29 lines
860 B
import { Page } from '@playwright/test'; |
|
import BasePage from '../Base'; |
|
import { CloudSSO } from './SSO'; |
|
|
|
export class OrgAdminPage extends BasePage { |
|
readonly ssoPage: CloudSSO; |
|
|
|
constructor(page: Page) { |
|
super(page); |
|
this.ssoPage = new CloudSSO(this); |
|
} |
|
|
|
get() { |
|
return this.rootPage.locator('body'); |
|
} |
|
async goto() { |
|
await this.rootPage.goto('/'); |
|
await this.rootPage.getByTestId('nc-sidebar-userinfo').click(); |
|
|
|
await this.rootPage.waitForTimeout(1000); |
|
|
|
if ((await this.rootPage.getByTestId('nc-sidebar-upgrade-workspace-to-org').count()) > 0) { |
|
await this.rootPage.getByTestId('nc-sidebar-upgrade-workspace-to-org').first().click(); |
|
} else { |
|
await this.rootPage.getByTestId('nc-sidebar-org-admin-panel').click(); |
|
} |
|
await this.rootPage.waitForNavigation({ url: /\/#\/admin\/\w+/ }); |
|
} |
|
}
|
|
|