mirror of https://github.com/nocodb/nocodb
3 changed files with 60 additions and 2 deletions
@ -0,0 +1,39 @@
|
||||
import BasePage from "../../../Base"; |
||||
import { ToolbarPage } from "."; |
||||
|
||||
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`); |
||||
} |
||||
|
||||
async enablePassword() { |
||||
await this.get() |
||||
.locator(`[data-pw="nc-modal-share-view__with-password"`) |
||||
.click(); |
||||
} |
||||
|
||||
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(); |
||||
} |
||||
} |
Loading…
Reference in new issue