mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-03 08:56:53 +00:00
* fix: replace ant design table * feat(nc-gui): custom table component * fix(nc-gui): udpate UIAcl table * fix(nc-gui): table scrolling issue * feat(nc-gui): sticky first column of custom table component * fix(nc-gui): update meta sync ant table with new table * fix(nc-gui): update import data table * fix(nc-gui): update import & upload data modal table * chore(nc-gui): lint * fix(nc-gui): update all table tab table * fix(nc-gui): update project members table * fix(nc-gui): update collaborators list table * fix(nc-gui): table list search section alignment issue * fix(nc-gui): collaborators list overflow issue * fix(nc-gui): small changes * fix(nc-gui): update project home page tables height * fix(nc-gui): update oss user table * fix(nc-gui): small changes * test(nc-gui): update ant table related test cases * test(nc-gui): update oss user list test cases * chore(nc-gui): lint * chore(nc-gui): cleanup unused css * fix(nc-gui): add missing invite team image state * fix(nc-gui): user management test fail issue * fix(test): oss user management test fails issue * fix(nc-gui): some pr review changes * fix(nc-gui): handle empty object entries destructuring case * fix(nc-gui): pr review changes * fix(nc-gui): disable ui acl header checkbox is list is empty * fix(nc-gui): update oss user management pw test --------- Co-authored-by: Pranav C <pranavxc@gmail.com>
53 lines
1.8 KiB
TypeScript
53 lines
1.8 KiB
TypeScript
import { expect } from '@playwright/test';
|
|
import BasePage from '../../Base';
|
|
import { getTextExcludeIconText } from '../../../tests/utils/general';
|
|
import { DataSourcePage } from './DataSourcePage';
|
|
|
|
export class MetaDataPage extends BasePage {
|
|
constructor(dataSource: DataSourcePage) {
|
|
super(dataSource.rootPage);
|
|
}
|
|
|
|
get() {
|
|
return this.rootPage.locator('div.ant-modal-content');
|
|
}
|
|
|
|
async clickReload() {
|
|
await this.get().locator(`button:has-text("Reload")`).click();
|
|
|
|
// todo: Remove this wait
|
|
await this.rootPage.waitForTimeout(100);
|
|
// await this.get().locator(`.animate-spin`).waitFor({state: 'visible'});
|
|
await this.get().locator(`.animate-spin`).waitFor({ state: 'detached', timeout: 10000 });
|
|
}
|
|
|
|
async close() {
|
|
await this.get().click();
|
|
await this.rootPage.keyboard.press('Escape');
|
|
await this.rootPage.keyboard.press('Escape');
|
|
await this.rootPage.waitForSelector('div.ant-modal-content', {
|
|
state: 'hidden',
|
|
});
|
|
}
|
|
|
|
async sync() {
|
|
await this.get().locator(`button:has-text("Sync Now")`).click();
|
|
await this.verifyToast({ message: 'Table metadata recreated successfully' });
|
|
await this.get().locator(`.animate-spin`).waitFor({ state: 'visible' });
|
|
await this.get().locator(`.animate-spin`).waitFor({ state: 'detached', timeout: 10000 });
|
|
}
|
|
|
|
async verifyRow({ index, model, state }: { index: number; model: string; state: string }) {
|
|
const fieldLocator = this.get().locator(`tr.nc-table-row`).nth(index).locator(`td.nc-table-cell`).nth(0);
|
|
const fieldText = await getTextExcludeIconText(fieldLocator);
|
|
expect(fieldText).toBe(model);
|
|
|
|
await expect(this.get().locator(`tr.nc-table-row`).nth(index).locator(`td.nc-table-cell`).nth(1)).toHaveText(
|
|
state,
|
|
{
|
|
ignoreCase: true,
|
|
}
|
|
);
|
|
}
|
|
}
|