Browse Source

test: class name to assist cypress

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/2730/head
Raju Udava 2 years ago
parent
commit
2f354efb60
  1. 10
      packages/nc-gui-v2/pages/index/index.vue
  2. 23
      packages/nc-gui-v2/pages/project/index/create-external.vue

10
packages/nc-gui-v2/pages/index/index.vue

@ -83,7 +83,7 @@ $state.sidebarOpen.value = false
<div class="flex-grow"></div> <div class="flex-grow"></div>
<a-dropdown @click.stop> <a-dropdown @click.stop>
<a-button> <a-button class="nc-new-project-menu">
<div class="flex align-center"> <div class="flex align-center">
{{ $t('title.newProj') }} {{ $t('title.newProj') }}
<MdiMenuDown class="menu-icon" /> <MdiMenuDown class="menu-icon" />
@ -94,7 +94,7 @@ $state.sidebarOpen.value = false
<a-menu> <a-menu>
<div <div
v-t="['c:project:create:xcdb']" v-t="['c:project:create:xcdb']"
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2" class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2 nc-create-xc-db-project"
@click="navigateTo('/project/create')" @click="navigateTo('/project/create')"
> >
<MdiPlus class="col-span-2 mr-1 mt-[1px] text-primary text-lg" /> <MdiPlus class="col-span-2 mr-1 mt-[1px] text-primary text-lg" />
@ -102,7 +102,7 @@ $state.sidebarOpen.value = false
</div> </div>
<div <div
v-t="['c:project:create:extdb']" v-t="['c:project:create:extdb']"
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2" class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2 nc-create-external-db-project"
@click="navigateTo('/project/create-external')" @click="navigateTo('/project/create-external')"
> >
<MdiDatabaseOutline class="col-span-2 mr-1 mt-[1px] text-green-500 text-lg" /> <MdiDatabaseOutline class="col-span-2 mr-1 mt-[1px] text-green-500 text-lg" />
@ -133,7 +133,9 @@ $state.sidebarOpen.value = false
<!-- Title --> <!-- Title -->
<a-table-column key="title" :title="$t('general.title')" data-index="title"> <a-table-column key="title" :title="$t('general.title')" data-index="title">
<template #default="{ text }"> <template #default="{ text }">
<div class="capitalize !w-[400px] overflow-hidden overflow-ellipsis whitespace-nowrap" :title="text">{{ text }}</div> <div class="capitalize !w-[400px] overflow-hidden overflow-ellipsis whitespace-nowrap nc-project-row" :title="text">
{{ text }}
</div>
</template> </template>
</a-table-column> </a-table-column>
<!-- Actions --> <!-- Actions -->

23
packages/nc-gui-v2/pages/project/index/create-external.vue

@ -229,11 +229,11 @@ onMounted(() => {
:wrapper-col="{ span: 18 }" :wrapper-col="{ span: 18 }"
> >
<a-form-item :label="$t('placeholder.projName')" v-bind="validateInfos.title"> <a-form-item :label="$t('placeholder.projName')" v-bind="validateInfos.title">
<a-input v-model:value="formState.title" size="small" /> <a-input v-model:value="formState.title" size="small" class="nc-extdb-proj-name" />
</a-form-item> </a-form-item>
<a-form-item :label="$t('labels.dbType')" v-bind="validateInfos['dataSource.client']"> <a-form-item :label="$t('labels.dbType')" v-bind="validateInfos['dataSource.client']">
<a-select v-model:value="formState.dataSource.client" size="small" @change="onClientChange"> <a-select v-model:value="formState.dataSource.client" size="small" class="nc-extdb-db-type" @change="onClientChange">
<a-select-option v-for="client in clientTypes" :key="client.value" :value="client.value" <a-select-option v-for="client in clientTypes" :key="client.value" :value="client.value"
>{{ client.text }} >{{ client.text }}
</a-select-option> </a-select-option>
@ -252,22 +252,26 @@ onMounted(() => {
<template v-else> <template v-else>
<!-- Host Address --> <!-- Host Address -->
<a-form-item :label="$t('labels.hostAddress')" v-bind="validateInfos['dataSource.connection.host']"> <a-form-item :label="$t('labels.hostAddress')" v-bind="validateInfos['dataSource.connection.host']">
<a-input v-model:value="formState.dataSource.connection.host" size="small" /> <a-input v-model:value="formState.dataSource.connection.host" size="small" class="nc-extdb-host-address" />
</a-form-item> </a-form-item>
<!-- Port Number --> <!-- Port Number -->
<a-form-item :label="$t('labels.port')" v-bind="validateInfos['dataSource.connection.port']"> <a-form-item :label="$t('labels.port')" v-bind="validateInfos['dataSource.connection.port']">
<a-input-number v-model:value="formState.dataSource.connection.port" class="!w-full" size="small" /> <a-input-number v-model:value="formState.dataSource.connection.port" class="!w-full nc-extdb-host-port" size="small" />
</a-form-item> </a-form-item>
<!-- Username --> <!-- Username -->
<a-form-item :label="$t('labels.username')" v-bind="validateInfos['dataSource.connection.user']"> <a-form-item :label="$t('labels.username')" v-bind="validateInfos['dataSource.connection.user']">
<a-input v-model:value="formState.dataSource.connection.user" size="small" /> <a-input v-model:value="formState.dataSource.connection.user" size="small" class="nc-extdb-host-user" />
</a-form-item> </a-form-item>
<!-- Password --> <!-- Password -->
<a-form-item :label="$t('labels.password')"> <a-form-item :label="$t('labels.password')">
<a-input-password v-model:value="formState.dataSource.connection.password" size="small" /> <a-input-password
v-model:value="formState.dataSource.connection.password"
size="small"
class="nc-extdb-host-password"
/>
</a-form-item> </a-form-item>
<!-- Database --> <!-- Database -->
@ -277,6 +281,7 @@ onMounted(() => {
v-model:value="formState.dataSource.connection.database" v-model:value="formState.dataSource.connection.database"
:placeholder="$t('labels.dbCreateIfNotExists')" :placeholder="$t('labels.dbCreateIfNotExists')"
size="small" size="small"
class="nc-extdb-host-database"
/> />
</a-form-item> </a-form-item>
<!-- Schema name --> <!-- Schema name -->
@ -355,8 +360,10 @@ onMounted(() => {
<a-form-item class="flex justify-center mt-5"> <a-form-item class="flex justify-center mt-5">
<div class="flex justify-center gap-2"> <div class="flex justify-center gap-2">
<a-button type="primary" @click="testConnection">Test Connection</a-button> <a-button type="primary" class="nc-extdb-btn-test-connection" @click="testConnection">
<a-button type="primary" :disabled="!testSuccess" @click="createProject">Submit</a-button> {{ $t('activity.testDbConn') }}
</a-button>
<a-button type="primary" :disabled="!testSuccess" class="nc-extdb-btn-submit" @click="createProject"> Submit </a-button>
</div> </div>
</a-form-item> </a-form-item>
</a-form> </a-form>

Loading…
Cancel
Save