fix: fixed list and e2e
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
ff813dc97a
commit
a8b28de2a4
|
@ -5,6 +5,9 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -60,20 +63,17 @@ const columns = computed(() => [
|
||||||
label: t('code'),
|
label: t('code'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: t('globals.name'),
|
label: t('globals.name'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('worker'),
|
label: t('worker'),
|
||||||
name: 'workerFk',
|
name: 'workerFk',
|
||||||
create: true,
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/search',
|
url: 'Workers/search',
|
||||||
|
@ -100,7 +100,6 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'categoryFk',
|
name: 'categoryFk',
|
||||||
label: t('ItemCategory'),
|
label: t('ItemCategory'),
|
||||||
create: true,
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
options: itemCategoriesOptions.value,
|
options: itemCategoriesOptions.value,
|
||||||
|
@ -112,7 +111,6 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'Temperature',
|
name: 'Temperature',
|
||||||
label: t('Temperature'),
|
label: t('Temperature'),
|
||||||
create: true,
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
options: temperatureOptions.value,
|
options: temperatureOptions.value,
|
||||||
|
@ -180,6 +178,33 @@ const columns = computed(() => [
|
||||||
<WorkerDescriptorProxy :id="row.workerFk" />
|
<WorkerDescriptorProxy :id="row.workerFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #more-create-dialog="{ data }">
|
||||||
|
<VnInput v-model="data.code" :label="t('code')" data-cy="codeInput" />
|
||||||
|
<VnInput
|
||||||
|
v-model="data.name"
|
||||||
|
:label="t('globals.name')"
|
||||||
|
data-cy="nameInput"
|
||||||
|
/>
|
||||||
|
<VnSelectWorker v-model="data.workerFk" data-cy="workerSelect" />
|
||||||
|
<VnSelect
|
||||||
|
:label="t('ItemCategory')"
|
||||||
|
v-model="data.categoryFk"
|
||||||
|
:options="itemCategoriesOptions"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
hide-selected
|
||||||
|
data-cy="itemCategorySelect"
|
||||||
|
/>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('Temperature')"
|
||||||
|
v-model="data.temperatureFk"
|
||||||
|
:options="temperatureOptions"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
hide-selected
|
||||||
|
data-cy="temperatureSelect"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
</VnSection>
|
</VnSection>
|
||||||
|
|
|
@ -8,15 +8,11 @@ describe('Item type', () => {
|
||||||
|
|
||||||
it('should throw an error if the code already exists', () => {
|
it('should throw an error if the code already exists', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
cy.get(
|
cy.dataCy('codeInput').type('ALS');
|
||||||
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
|
cy.dataCy('nameInput').type('Alstroemeria');
|
||||||
).type('ALS');
|
cy.dataCy('workerSelect').type('employeeNick');
|
||||||
cy.get(
|
|
||||||
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Name_input"]'
|
|
||||||
).type('Alstroemeria');
|
|
||||||
cy.dataCy('Worker_select').type('employeeNick');
|
|
||||||
cy.get('.q-menu .q-item').contains('employeeNick').click();
|
cy.get('.q-menu .q-item').contains('employeeNick').click();
|
||||||
cy.dataCy('ItemCategory_select').type('Artificial');
|
cy.dataCy('itemCategorySelect').type('Artificial');
|
||||||
cy.get('.q-menu .q-item').contains('Artificial').click();
|
cy.get('.q-menu .q-item').contains('Artificial').click();
|
||||||
cy.dataCy('FormModelPopup_save').click();
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
cy.checkNotification('An item type with the same code already exists');
|
cy.checkNotification('An item type with the same code already exists');
|
||||||
|
@ -24,15 +20,11 @@ describe('Item type', () => {
|
||||||
|
|
||||||
it('should create a new type', () => {
|
it('should create a new type', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
cy.get(
|
cy.dataCy('codeInput').type('LIL');
|
||||||
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
|
cy.dataCy('nameInput').type('Lilium');
|
||||||
).type('LIL');
|
cy.dataCy('workerSelect').type('buyerNick');
|
||||||
cy.get(
|
|
||||||
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Name_input"]'
|
|
||||||
).type('Lilium');
|
|
||||||
cy.dataCy('Worker_select').type('buyerNick');
|
|
||||||
cy.get('.q-menu .q-item').contains('buyerNick').click();
|
cy.get('.q-menu .q-item').contains('buyerNick').click();
|
||||||
cy.dataCy('ItemCategory_select').type('Flower');
|
cy.dataCy('itemCategorySelect').type('Flower');
|
||||||
cy.get('.q-menu .q-item').contains('Flower').click();
|
cy.get('.q-menu .q-item').contains('Flower').click();
|
||||||
cy.dataCy('FormModelPopup_save').click();
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
|
|
Loading…
Reference in New Issue