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.
39 lines
1018 B
39 lines
1018 B
import BasePage from '../../Base'; |
|
import { DashboardPage } from '..'; |
|
|
|
export class CmdJ extends BasePage { |
|
readonly dashboardPage: DashboardPage; |
|
|
|
constructor(dashboard: DashboardPage) { |
|
super(dashboard.rootPage); |
|
this.dashboardPage = dashboard; |
|
} |
|
|
|
get() { |
|
return this.dashboardPage.get().locator('.DocSearch'); |
|
} |
|
|
|
async openCmdJ() { |
|
await this.dashboardPage.rootPage.keyboard.press((await this.isMacOs()) ? 'Meta+J' : 'Control+J'); |
|
// await this.dashboardPage.rootPage.waitForSelector('.DocSearch-Input'); |
|
} |
|
|
|
async searchText(text: string) { |
|
await this.dashboardPage.rootPage.fill('.DocSearch-Input', text); |
|
} |
|
|
|
async isCmdJVisible() { |
|
const isVisible = this.get(); |
|
return await isVisible.count(); |
|
} |
|
|
|
async isCmdJNotVisible() { |
|
const isNotVisible = this.get(); |
|
return await isNotVisible.count(); |
|
} |
|
|
|
async getPlaceholderText() { |
|
const placeholderText = this.get().locator('.DocSearch-Input'); |
|
return await placeholderText.innerText(); |
|
} |
|
}
|
|
|