first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
import { BasePage } from './BasePage';
|
||||
import { AddResource } from './components/AddResource';
|
||||
|
||||
export class DataTableView extends BasePage {
|
||||
readonly addResource = new AddResource(this.page);
|
||||
|
||||
getEmptyStateActionBox() {
|
||||
return this.page.getByTestId('empty-data-table-action-box');
|
||||
}
|
||||
|
||||
getEmptyStateActionBoxButton() {
|
||||
return this.getEmptyStateActionBox().getByRole('button');
|
||||
}
|
||||
|
||||
getNewDataTableModal() {
|
||||
return this.page.getByTestId('addDataTableModal-modal');
|
||||
}
|
||||
|
||||
getNewDataTableNameInput() {
|
||||
return this.page.getByTestId('data-table-name-input-select');
|
||||
}
|
||||
|
||||
getFromScratchOption() {
|
||||
return this.page.getByTestId('create-from-scratch-option');
|
||||
}
|
||||
|
||||
getProceedFromSelectButton() {
|
||||
return this.page.getByTestId('proceed-from-select-button');
|
||||
}
|
||||
|
||||
getDataTableCards() {
|
||||
return this.page.getByTestId('data-table-card');
|
||||
}
|
||||
|
||||
getDataTableCardByName(name: string) {
|
||||
return this.getDataTableCards().filter({ hasText: name });
|
||||
}
|
||||
|
||||
getDataTableCardActionsButton(dataTableName: string) {
|
||||
return this.getDataTableCardByName(dataTableName).getByTestId('data-table-card-actions');
|
||||
}
|
||||
|
||||
getDataTableCardAction(actionName: string) {
|
||||
return this.page.getByTestId('action-toggle-dropdown').getByTestId(`action-${actionName}`);
|
||||
}
|
||||
|
||||
getDeleteDataTableModal() {
|
||||
return this.page.locator('.el-message-box').filter({ hasText: 'Delete Data table' });
|
||||
}
|
||||
|
||||
getDeleteDataTableConfirmButton() {
|
||||
return this.getDeleteDataTableModal().locator('.btn--confirm');
|
||||
}
|
||||
|
||||
getDataTablePageSizeSelect() {
|
||||
return this.page.getByTestId('resources-list-pagination').locator('.el-pagination__sizes');
|
||||
}
|
||||
|
||||
getDataTablePageOption(pageSize: string) {
|
||||
return this.page.locator('.el-select-dropdown__item').filter({ hasText: `${pageSize}/page` });
|
||||
}
|
||||
|
||||
getPaginationNextButton() {
|
||||
return this.page.getByTestId('resources-list-pagination').locator('button.btn-next');
|
||||
}
|
||||
|
||||
async clickDataTableProjectTab() {
|
||||
await this.clickByTestId('tab-project-data-tables');
|
||||
}
|
||||
|
||||
async clickEmptyStateButton() {
|
||||
await this.getEmptyStateActionBoxButton().click();
|
||||
}
|
||||
|
||||
async clickAddDataTableAction(fromDataTableTab: boolean = true) {
|
||||
await this.addResource.dataTable(fromDataTableTab);
|
||||
}
|
||||
|
||||
async clickDataTableCardActionsButton(dataTableName: string) {
|
||||
await this.getDataTableCardActionsButton(dataTableName).click();
|
||||
}
|
||||
|
||||
async clickDeleteDataTableConfirmButton() {
|
||||
await this.getDeleteDataTableConfirmButton().click();
|
||||
}
|
||||
|
||||
async selectDataTablePageSize(pageSize: string) {
|
||||
await this.getDataTablePageSizeSelect().click();
|
||||
await this.getDataTablePageOption(pageSize).click();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user