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.
36 lines
1018 B
36 lines
1018 B
import BasePage from '../../Base'; |
|
import { DashboardPage } from '..'; |
|
|
|
export class WorkspaceSettingsObject extends BasePage { |
|
readonly dashboard: DashboardPage; |
|
|
|
constructor(parent: DashboardPage) { |
|
super(parent.rootPage); |
|
|
|
this.dashboard = parent; |
|
} |
|
|
|
get() { |
|
return this.dashboard.get().locator(`.nc-workspace-settings`); |
|
} |
|
|
|
async open() { |
|
await this.dashboard.leftSidebar.clickTeamAndSettings(); |
|
} |
|
|
|
async clickSettingsTab() { |
|
await this.get().getByTestId('nc-workspace-settings-tab-settings').click(); |
|
} |
|
|
|
async renameWorkspace({ newTitle }: { newTitle: string }) { |
|
await this.clickSettingsTab(); |
|
await this.get().getByTestId('nc-workspace-settings-settings-rename-input').fill(newTitle); |
|
const submitAction = () => this.get().getByTestId('nc-workspace-settings-settings-rename-submit').click(); |
|
|
|
await this.waitForResponse({ |
|
uiAction: submitAction, |
|
httpMethodsToMatch: ['PATCH'], |
|
requestUrlPathToMatch: `/api/v1/workspaces/`, |
|
}); |
|
} |
|
}
|
|
|