mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 02:05:16 +00:00
test: use API to prep beforeEach work
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user