Browse Source

Merge branch 'feat/kanban-view' of https://github.com/nocodb/nocodb into feat/kanban-view

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
ee25b9fa16
  1. 2
      packages/nc-gui/components/smartsheet-toolbar/FieldsMenu.vue
  2. 2
      packages/nc-gui/components/smartsheet/Kanban.vue
  3. 2
      packages/nc-gui/components/smartsheet/sidebar/RenameableMenuItem.vue
  4. 17
      scripts/cypress/support/commands.js
  5. 10
      scripts/cypress/support/page_objects/mainPage.js

2
packages/nc-gui/components/smartsheet-toolbar/FieldsMenu.vue

@ -164,7 +164,7 @@ const getIcon = (c: ColumnType) =>
<a-divider class="!my-2" />
<div v-if="!isPublic" class="p-2 py-1 flex" @click.stop>
<div v-if="!isPublic" class="p-2 py-1 flex nc-fields-show-system-fields" @click.stop>
<a-checkbox v-model:checked="showSystemFields" class="!items-center">
<span class="text-xs"> {{ $t('activity.showSystemFields') }}</span>
</a-checkbox>

2
packages/nc-gui/components/smartsheet/Kanban.vue

@ -195,7 +195,7 @@ openNewRecordFormHook?.on(async (stackTitle) => {
<a-layout v-else class="!bg-[#f0f2f5]">
<a-layout-header>
<div class="nc-kanban-stack-head font-bold flex items-center px-[15px]">
<a-dropdown :trigger="['click']" overlay-class-name="nc-dropdown-actions-menu">
<a-dropdown :trigger="['click']" overlay-class-name="nc-dropdown-kanban-stack-context-menu">
<div class="flex items-center cursor-pointer w-full">
<GeneralTruncateText>{{ stack.title }}</GeneralTruncateText>
<span class="w-full flex">

2
packages/nc-gui/components/smartsheet/sidebar/RenameableMenuItem.vue

@ -180,7 +180,7 @@ function onStopEdit() {
{{ $t('activity.copyView') }}
</template>
<MdiContentCopy class="hidden group-hover:block text-gray-500" @click.stop="onDuplicate" />
<MdiContentCopy class="hidden group-hover:block text-gray-500 nc-view-copy-icon" @click.stop="onDuplicate" />
</a-tooltip>
<template v-if="!vModel.is_default">

17
scripts/cypress/support/commands.js

@ -526,6 +526,23 @@ Cypress.Commands.add('viewDelete', (viewIndex) => {
cy.toastWait("View deleted successfully");
})
// viewDuplicate
// : duplicate view by index (0-based, *include* default view)
//
Cypress.Commands.add('viewCopy', (viewIndex) => {
// click on delete icon (becomes visible on hovering mouse)
cy.get(".nc-view-copy-icon")
.eq(viewIndex)
.click({ force: true });
cy.wait(300)
// click on 'Delete' button on confirmation modal
cy.getActiveModal(".nc-modal-view-create")
.find('.ant-btn-primary')
.click();
cy.toastWait("View created successfully");
})
// viewRename
// : rename view by index (0-based, exclude default view)
//

10
scripts/cypress/support/page_objects/mainPage.js

@ -300,11 +300,17 @@ export class _mainPage {
cy.get(".nc-fields-menu-btn").should('exist').click();
}
toggleShowSystemFields = () => {
cy.get(".nc-fields-menu-btn").should('exist').click();
cy.getActiveMenu(".nc-dropdown-fields-menu").find('.nc-fields-show-system-fields').click();
cy.get(".nc-fields-menu-btn").should('exist').click();
}
hideField = (field) => {
cy.get(`th[data-title="${field}"]`).should("be.visible");
cy.get(".nc-fields-menu-btn").click();
cy.wait(500)
cy.getActiveMenu(".nc-dropdown-fields-menu").find(`.nc-fields-list label:contains(${field}):visible`).click();
cy.getActiveMenu(".nc-dropdown-fields-menu").find(`.nc-fields-list label:visible`).contains(new RegExp("^" + field + "$", "g")).click();
cy.wait(500)
cy.get(".nc-fields-menu-btn").click();
cy.wait(500)
@ -317,7 +323,7 @@ export class _mainPage {
}
cy.get(".nc-fields-menu-btn").click();
cy.wait(500)
cy.getActiveMenu(".nc-dropdown-fields-menu").find(`.nc-fields-list label:contains(${field}):visible`).click();
cy.getActiveMenu(".nc-dropdown-fields-menu").find(`.nc-fields-list label:visible`).contains(new RegExp("^" + field + "$", "g")).click();
cy.wait(500)
cy.get(".nc-fields-menu-btn").click();
cy.wait(500)

Loading…
Cancel
Save