Browse Source

test: metadata

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5363/head
Raju Udava 2 years ago
parent
commit
d8e6f507f9
  1. 11
      tests/playwright/pages/Dashboard/Settings/Metadata.ts

11
tests/playwright/pages/Dashboard/Settings/Metadata.ts

@ -1,6 +1,7 @@
import { expect } from '@playwright/test'; import { expect } from '@playwright/test';
import BasePage from '../../Base'; import BasePage from '../../Base';
import { DataSourcesPage } from './DataSources'; import { DataSourcesPage } from './DataSources';
import { getTextExcludeIconText } from '../../../tests/utils/general';
export class MetaDataPage extends BasePage { export class MetaDataPage extends BasePage {
private readonly dataSources: DataSourcesPage; private readonly dataSources: DataSourcesPage;
@ -31,12 +32,10 @@ export class MetaDataPage extends BasePage {
} }
async verifyRow({ index, model, state }: { index: number; model: string; state: string }) { async verifyRow({ index, model, state }: { index: number; model: string; state: string }) {
await expect(this.get().locator(`tr.ant-table-row`).nth(index).locator(`td.ant-table-cell`).nth(0)).toHaveText( const fieldLocator = await this.get().locator(`tr.ant-table-row`).nth(index).locator(`td.ant-table-cell`).nth(0);
model, const fieldText = await getTextExcludeIconText(fieldLocator);
{ await expect(fieldText).toBe(model);
ignoreCase: true,
}
);
await expect(this.get().locator(`tr.ant-table-row`).nth(index).locator(`td.ant-table-cell`).nth(1)).toHaveText( await expect(this.get().locator(`tr.ant-table-row`).nth(index).locator(`td.ant-table-cell`).nth(1)).toHaveText(
state, state,
{ {

Loading…
Cancel
Save