mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 10:27:38 +00:00
test: remove unintended awaits
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
@@ -19,7 +19,7 @@ export class ImportTemplatePage extends BasePage {
|
||||
|
||||
async getImportTableList() {
|
||||
await this.get().locator(`.ant-collapse-header`).nth(0).waitFor();
|
||||
const tr = await this.get().locator(`.ant-collapse-header`);
|
||||
const tr = this.get().locator(`.ant-collapse-header`);
|
||||
const rowCount = await tr.count();
|
||||
const tableList: string[] = [];
|
||||
for (let i = 0; i < rowCount; i++) {
|
||||
@@ -32,7 +32,7 @@ export class ImportTemplatePage extends BasePage {
|
||||
async getImportColumnList() {
|
||||
// return an array
|
||||
const columnList: { type: string; name: string }[] = [];
|
||||
const tr = await this.get().locator(`tr.ant-table-row-level-0:visible`);
|
||||
const tr = this.get().locator(`tr.ant-table-row-level-0:visible`);
|
||||
const rowCount = await tr.count();
|
||||
for (let i = 0; i < rowCount; i++) {
|
||||
// replace \n and \t from innerText
|
||||
@@ -51,9 +51,9 @@ export class ImportTemplatePage extends BasePage {
|
||||
|
||||
const tblList = await this.getImportTableList();
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
await expect(tblList[i]).toBe(result[i].name);
|
||||
expect(tblList[i]).toBe(result[i].name);
|
||||
const columnList = await this.getImportColumnList();
|
||||
await expect(columnList).toEqual(result[i].columns);
|
||||
expect(columnList).toEqual(result[i].columns);
|
||||
if (i < result.length - 1) {
|
||||
await this.expandTableList({ index: i + 1 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user