From 25d420a3312b2e8339a64dbb725f801d861963f1 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Sat, 12 Nov 2022 12:36:44 +0530 Subject: [PATCH 1/4] fix(test): Changed tpo data-testid from data-nc --- .../nc-gui/components/cell/MultiSelect.vue | 2 +- .../nc-gui/components/cell/SingleSelect.vue | 2 +- .../components/cell/attachment/index.vue | 2 +- .../nc-gui/components/dashboard/TreeView.vue | 8 +-- .../dashboard/settings/AuditTab.vue | 2 +- .../components/dashboard/settings/Modal.vue | 4 +- .../nc-gui/components/dlg/TableCreate.vue | 2 +- .../components/general/TruncateText.vue | 2 +- .../nc-gui/components/smartsheet/Form.vue | 46 ++++++------ .../nc-gui/components/smartsheet/Gallery.vue | 4 +- .../nc-gui/components/smartsheet/Grid.vue | 22 +++--- .../nc-gui/components/smartsheet/Kanban.vue | 2 +- .../components/smartsheet/Pagination.vue | 2 +- .../smartsheet/column/EditOrAdd.vue | 2 +- .../smartsheet/column/SelectOptions.vue | 6 +- .../smartsheet/expanded-form/index.vue | 2 +- .../smartsheet/sidebar/RenameableMenuItem.vue | 8 +-- .../smartsheet/toolbar/ColumnFilterMenu.vue | 2 +- .../smartsheet/toolbar/FieldsMenu.vue | 4 +- .../smartsheet/toolbar/ShareView.vue | 26 +++---- .../smartsheet/toolbar/SortListMenu.vue | 2 +- .../smartsheet/toolbar/ViewActions.vue | 2 +- .../tabs/auth/user-management/ShareBase.vue | 2 +- .../components/ListChildItems.vue | 13 ++-- packages/nc-gui/layouts/base.vue | 8 +-- packages/nc-gui/layouts/shared-view.vue | 2 +- .../pages/[projectType]/[projectId]/index.vue | 4 +- .../[projectType]/[projectId]/index/index.vue | 6 +- .../form/[viewId]/index/index.vue | 6 +- .../form/[viewId]/index/survey.vue | 43 ++++------- packages/nc-gui/pages/index/index/index.vue | 6 +- packages/nc-gui/pages/index/index/user.vue | 12 ++-- packages/nc-gui/pages/signin.vue | 15 ++-- packages/nc-gui/tests/playwright/package.json | 1 + .../pages/Dashboard/ExpandedForm/index.ts | 8 +-- .../playwright/pages/Dashboard/Form/index.ts | 72 ++++++++++--------- .../pages/Dashboard/Gallery/index.ts | 2 +- .../Dashboard/Grid/Column/LTAR/ChildList.ts | 10 ++- .../Grid/Column/SelectOptionColumn.ts | 14 ++-- .../pages/Dashboard/Grid/Column/index.ts | 2 +- .../playwright/pages/Dashboard/Grid/index.ts | 36 +++++----- .../pages/Dashboard/Kanban/index.ts | 4 +- .../pages/Dashboard/Settings/Acl.ts | 2 +- .../pages/Dashboard/Settings/AppStore.ts | 2 +- .../pages/Dashboard/Settings/Audit.ts | 2 +- .../pages/Dashboard/Settings/Erd.ts | 2 +- .../pages/Dashboard/Settings/Metadata.ts | 2 +- .../pages/Dashboard/Settings/Miscellaneous.ts | 2 +- .../pages/Dashboard/Settings/Teams.ts | 4 +- .../pages/Dashboard/Settings/index.ts | 2 +- .../pages/Dashboard/SurveyForm/index.ts | 26 +++---- .../playwright/pages/Dashboard/TreeView.ts | 6 +- .../pages/Dashboard/ViewSidebar/index.ts | 26 ++++--- .../Dashboard/common/Cell/AttachmentCell.ts | 4 +- .../Dashboard/common/Cell/SelectOptionCell.ts | 5 +- .../pages/Dashboard/common/Cell/index.ts | 4 +- .../Dashboard/common/ProjectMenu/index.ts | 4 +- .../Dashboard/common/Toolbar/Actions/index.ts | 2 +- .../pages/Dashboard/common/Toolbar/Fields.ts | 8 +-- .../pages/Dashboard/common/Toolbar/Filter.ts | 4 +- .../Dashboard/common/Toolbar/ShareView.ts | 14 ++-- .../pages/Dashboard/common/Toolbar/Sort.ts | 4 +- .../tests/playwright/pages/Dashboard/index.ts | 33 ++++----- .../tests/playwright/pages/LoginPage/index.ts | 8 +-- .../playwright/pages/ProjectsPage/index.ts | 6 +- .../playwright/pages/SharedForm/index.ts | 2 +- .../nc-gui/tests/playwright/setup/index.ts | 4 +- .../tests/authChangePassword.spec.ts | 2 +- 68 files changed, 300 insertions(+), 300 deletions(-) diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index 2bffd5ff04..0da8f1f871 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -155,7 +155,7 @@ watch(isOpen, (n, _o) => { v-for="op of options" :key="op.id" :value="op.title" - :data-nc="`select-option-${column.title}-${rowIndex}`" + :data-testid="`select-option-${column.title}-${rowIndex}`" @click.stop > diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 53e7579a31..cb9258505c 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -86,7 +86,7 @@ watch(isOpen, (n, _o) => { v-for="op of options" :key="op.title" :value="op.title" - :data-nc="`select-option-${column.title}-${rowIndex}`" + :data-testid="`select-option-${column.title}-${rowIndex}`" @click.stop > diff --git a/packages/nc-gui/components/cell/attachment/index.vue b/packages/nc-gui/components/cell/attachment/index.vue index 0541f60272..f4be61efd5 100644 --- a/packages/nc-gui/components/cell/attachment/index.vue +++ b/packages/nc-gui/components/cell/attachment/index.vue @@ -161,7 +161,7 @@ watch( v-if="!isReadonly" :class="{ 'mx-auto px-4': !visibleItems.length }" class="group cursor-pointer flex gap-1 items-center active:(ring ring-accent ring-opacity-100) rounded border-1 p-1 shadow-sm hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)" - data-nc="attachment-cell-file-picker-button" + data-testid="attachment-cell-file-picker-button" @click.stop="open" > diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index f57eaabfc4..1d6d5ea031 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -331,13 +331,13 @@ const onSearchCloseIconClick = () => { class="nc-tree-item text-sm cursor-pointer group" :data-order="table.order" :data-id="table.id" - :data-nc="`tree-view-table-${table.title}`" + :data-testid="`tree-view-table-${table.title}`" @click="addTableTab(table)" >
-
+
{