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

@@ -403,7 +403,7 @@ const collapseKey = ref('')
<a-input
v-model:value="syncSource.details.syncSourceUrlOrId"
placeholder="Paste the Base URL or Base ID from Airtable"
class="!rounded-lg !mt-2"
class="!rounded-lg !mt-2 nc-input-shared-base"
/>
</a-form-item>

View File

@@ -1003,7 +1003,7 @@ const currentColumnToEdit = ref('');
</template>
<template v-else>
<div class="relative group w-full flex items-center" @click="currentColumnToEdit = `${tableIdx}-${record.column_name}`">
<span class="font-weight-500 max-w-[300px] inline-block truncate">
<span class="font-weight-500 max-w-[300px] inline-block truncate nc-import-table-field-name">
{{ record.title }}
</span>
<NcButton @click="currentColumnToEdit = `${tableIdx}-${record.column_name}`" type="text" size="small" class="!absolute right-0 top-1/2 transform -translate-y-1/2 opacity-0 group-hover:opacity-100 pointer-events-none group-hover:pointer-events-auto">

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;