test (nc-gui): imports modal align tests

This commit is contained in:
Yoones Khoshghadam
2025-01-04 07:00:41 +00:00
parent 745ade9308
commit 6d2f0fca39
3 changed files with 7 additions and 5 deletions

View File

@@ -38,10 +38,12 @@ export class ImportTemplatePage extends BasePage {
const columnList: { type: string; name: string }[] = [];
const tr = this.get().locator(`tr.nc-table-row:visible`);
const rowCount = await tr.count();
for (let i = 0; i < rowCount; i++) {
for (let i = 1; i < rowCount; i++) {
// we start from 1 because the first tr holds the select all toggle
// replace \n and \t from innerText
const columnType = (await getTextExcludeIconText(tr.nth(i))).replace(/\n|\t/g, '');
const columnName = await tr.nth(i).locator(`input[type="text"]`).inputValue();
// const columnType = (await getTextExcludeIconText(tr.nth(i))).replace(/\n|\t/g, '');
const columnType = 'SingleLineText'; // all columsn are treated as SingleLineText for now since we have removed the type column
const columnName = await tr.nth(i).locator(`.nc-import-table-field-name`).textContent();
columnList.push({ type: columnType, name: columnName });
}
return columnList;