Browse Source

refactor: clean-up comments

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/4703/head
Raju Udava 2 years ago
parent
commit
e1a73195a8
  1. 31
      packages/nc-gui/pages/index/index/index.vue
  2. 18
      tests/playwright/pages/ProjectsPage/index.ts
  3. 2
      tests/playwright/tests/projectOperations.spec.ts

31
packages/nc-gui/pages/index/index/index.vue

@ -174,42 +174,11 @@ const copyProjectMeta = async () => {
<div class="flex-1" /> <div class="flex-1" />
<!-- <a-dropdown v-if="isUIAllowed('projectCreate', true)" :trigger="['click']" overlay-class-name="nc-dropdown-create-project"> -->
<button v-if="isUIAllowed('projectCreate', true)" class="nc-new-project-menu mt-4 md:mt-0" @click="navigateTo('/create')"> <button v-if="isUIAllowed('projectCreate', true)" class="nc-new-project-menu mt-4 md:mt-0" @click="navigateTo('/create')">
<span class="flex items-center w-full"> <span class="flex items-center w-full">
{{ $t('title.newProj') }} {{ $t('title.newProj') }}
<!-- <MdiMenuDown class="menu-icon" /> -->
</span> </span>
</button> </button>
<!-- <template #overlay> -->
<!-- <a-menu class="!py-0 rounded"> -->
<!-- <a-menu-item> -->
<!-- <div -->
<!-- v-e="['c:project:create:xcdb']" -->
<!-- class="nc-project-menu-item group nc-create-xc-db-project" -->
<!-- @click="navigateTo('/create')" -->
<!-- > -->
<!-- <MdiPlusOutline class="group-hover:text-accent" /> -->
<!-- <div>{{ $t('activity.createProject') }}</div> -->
<!-- </div> -->
<!-- </a-menu-item> -->
<!-- <a-menu-item v-if="appInfo.connectToExternalDB"> -->
<!-- <div -->
<!-- v-e="['c:project:create:extdb']" -->
<!-- class="nc-project-menu-item group nc-create-external-db-project" -->
<!-- @click="navigateTo('/create-external')" -->
<!-- > -->
<!-- <MdiDatabaseOutline class="group-hover:text-accent" /> -->
<!-- <div v-html="$t('activity.createProjectExtended.extDB')" /> -->
<!-- </div> -->
<!-- </a-menu-item> -->
<!-- </a-menu> -->
<!-- </template> -->
<!-- </a-dropdown> -->
</div> </div>
<!-- <!--

18
tests/playwright/pages/ProjectsPage/index.ts

@ -17,28 +17,12 @@ export class ProjectsPage extends BasePage {
} }
// create project // create project
async createProject({ async createProject({ name = 'sample', withoutPrefix }: { name?: string; type?: string; withoutPrefix?: boolean }) {
name = 'sample',
type = 'xcdb',
withoutPrefix,
}: {
name?: string;
type?: string;
withoutPrefix?: boolean;
}) {
if (!withoutPrefix) name = this.prefixTitle(name); if (!withoutPrefix) name = this.prefixTitle(name);
// Click "New Project" button // Click "New Project" button
await this.get().locator('.nc-new-project-menu').click(); await this.get().locator('.nc-new-project-menu').click();
// const createProjectMenu = await this.rootPage.locator('.nc-dropdown-create-project');
//
// if (type === 'xcdb') {
// await createProjectMenu.locator(`.ant-dropdown-menu-title-content`).nth(0).click();
// } else {
// await createProjectMenu.locator(`.ant-dropdown-menu-title-content`).nth(1).click();
// }
await this.rootPage.locator(`.nc-metadb-project-name`).waitFor(); await this.rootPage.locator(`.nc-metadb-project-name`).waitFor();
await this.rootPage.locator(`input.nc-metadb-project-name`).fill(name); await this.rootPage.locator(`input.nc-metadb-project-name`).fill(name);

2
tests/playwright/tests/projectOperations.spec.ts

@ -19,7 +19,7 @@ test.describe('Project operations', () => {
test('rename, delete', async () => { test('rename, delete', async () => {
await dashboard.clickHome(); await dashboard.clickHome();
await projectPage.createProject({ name: 'project-1', type: 'xcdb' }); await projectPage.createProject({ name: 'project-1' });
await dashboard.clickHome(); await dashboard.clickHome();
await projectPage.renameProject({ await projectPage.renameProject({
title: 'project-1', title: 'project-1',

Loading…
Cancel
Save