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.
33 lines
964 B
33 lines
964 B
3 months ago
|
import BasePage from '../Base';
|
||
|
import { AccountSetupPage } from './Setup';
|
||
|
|
||
|
export class AccountSetupListPage extends BasePage {
|
||
|
private setupPage: AccountSetupPage;
|
||
|
|
||
|
constructor(setupPage: AccountSetupPage) {
|
||
|
super(setupPage.rootPage);
|
||
|
this.setupPage = setupPage;
|
||
|
}
|
||
|
|
||
|
async goto(category: 'email' | 'storage') {
|
||
|
await this.rootPage.goto(`/#/account/setup/${category}`);
|
||
|
}
|
||
|
|
||
|
get() {
|
||
|
return this.setupPage.get().locator(`[data-test-id="nc-setup-list"]`);
|
||
|
}
|
||
|
|
||
|
getPluginItem(plugin: string) {
|
||
|
return this.get().locator(`[data-test-id="nc-setup-list-item-${plugin}"]`);
|
||
|
}
|
||
|
|
||
|
async isConfigured(plugin: string) {
|
||
|
return await this.getPluginItem(plugin).locator('.nc-configured').isVisible();
|
||
|
}
|
||
|
|
||
|
async reset(plugin: string) {
|
||
|
await this.getPluginItem(plugin).locator('.nc-setup-plugin-menu').click();
|
||
|
await this.rootPage.locator('.ant-dropdown').locator('[data-test-id="nc-config-reset"].nc-menu-item').click();
|
||
|
}
|
||
|
}
|