Browse Source

test: use API to prep beforeEach work

pull/8888/head
Raju Udava 5 months ago
parent
commit
dd99060f04
  1. 12
      tests/playwright/tests/db/columns/columnMultiSelect.spec.ts

12
tests/playwright/tests/db/columns/columnMultiSelect.spec.ts

@ -244,6 +244,8 @@ test.describe('Multi select - filters', () => {
options: ['foo', 'bar', 'baz'],
});
const selectOptions = ['', 'foo', 'bar', 'baz', 'foo,bar', 'foo,bar,baz'];
try {
const tables = await api.dbTable.list(context.base.id);
const rowAttributes = [];
@ -251,6 +253,7 @@ test.describe('Multi select - filters', () => {
const row = {
Id: i + 1,
Title: `${i + 1}`,
MultiSelect: selectOptions[i],
};
rowAttributes.push(row);
}
@ -263,15 +266,6 @@ test.describe('Multi select - filters', () => {
// page reload
await page.reload();
await grid.cell.selectOption.select({ index: 1, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true });
await grid.cell.selectOption.select({ index: 2, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true });
await grid.cell.selectOption.select({ index: 3, columnHeader: 'MultiSelect', option: 'baz', multiSelect: true });
await grid.cell.selectOption.select({ index: 4, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true });
await grid.cell.selectOption.select({ index: 4, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true });
await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true });
await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true });
await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'baz', multiSelect: true });
});
test.afterEach(async () => {

Loading…
Cancel
Save