28 lines
678 B
JavaScript
28 lines
678 B
JavaScript
const BasePage = require('./base.page');
|
|
|
|
class DatabasePage extends BasePage {
|
|
get url() { return 'database'; }
|
|
|
|
async filterName(name) {
|
|
await this.website.enterInput(this.website.findAll('filterName').first(), name);
|
|
return this;
|
|
}
|
|
|
|
async getEntityName(entityType, entityName) {
|
|
return await this.website
|
|
.findWithParent('entityName', `${entityType.toLowerCase()}-${entityName.toLowerCase()}`)
|
|
.innerText();
|
|
}
|
|
|
|
async getEntityNameByIndex(index) {
|
|
return await this.website.findAll('entityName').nth(index).innerText();
|
|
}
|
|
|
|
async goto() {
|
|
await this.website.goto(this.url);
|
|
return this;
|
|
}
|
|
}
|
|
|
|
module.exports = DatabasePage;
|