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.
57 lines
1.3 KiB
57 lines
1.3 KiB
2 years ago
|
import BasePage from "../../../Base";
|
||
2 years ago
|
import { ToolbarPage } from "./index";
|
||
2 years ago
|
|
||
|
export class ToolbarShareViewPage extends BasePage {
|
||
|
readonly toolbar: ToolbarPage;
|
||
|
|
||
|
constructor(toolbar: ToolbarPage) {
|
||
|
super(toolbar.rootPage);
|
||
|
this.toolbar = toolbar;
|
||
|
}
|
||
|
|
||
|
get() {
|
||
|
return this.rootPage.locator(`.nc-modal-share-view`);
|
||
|
}
|
||
|
|
||
2 years ago
|
async enablePassword(pwd: string) {
|
||
2 years ago
|
await this.get()
|
||
2 years ago
|
.locator(`[data-pw="nc-modal-share-view__with-password"]`)
|
||
|
.click();
|
||
|
await this.get()
|
||
|
.locator(`[data-pw="nc-modal-share-view__password"]`)
|
||
|
.fill(pwd);
|
||
|
await this.get()
|
||
|
.locator(`[data-pw="nc-modal-share-view__save-password"]`)
|
||
2 years ago
|
.click();
|
||
2 years ago
|
await this.toastWait({ message: "Successfully updated" });
|
||
2 years ago
|
}
|
||
|
|
||
|
async disablePassword() {
|
||
|
await this.get()
|
||
|
.locator(`[data-pw="nc-modal-share-view__with-password"`)
|
||
|
.click();
|
||
|
}
|
||
|
|
||
|
async toggleDownload() {
|
||
|
await this.get()
|
||
|
.locator(`[data-pw="nc-modal-share-view__with-csv-download"]`)
|
||
|
.click();
|
||
|
}
|
||
|
|
||
|
async getShareLink() {
|
||
|
return this.get()
|
||
|
.locator(`[data-pw="nc-modal-share-view__link"]`)
|
||
|
.innerText();
|
||
|
}
|
||
2 years ago
|
|
||
|
async close() {
|
||
|
await this.get().locator(`.ant-modal-close-x`).click();
|
||
|
}
|
||
2 years ago
|
|
||
|
async toggleSurveyMode() {
|
||
|
await this.get()
|
||
|
.locator(`[data-pw="nc-modal-share-view__survey-mode"]`)
|
||
|
.click();
|
||
|
}
|
||
2 years ago
|
}
|