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 WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.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 tableRef = ref();
|
||||
|
@ -60,20 +63,17 @@ const columns = computed(() => [
|
|||
label: t('code'),
|
||||
isTitle: true,
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'name',
|
||||
label: t('globals.name'),
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker'),
|
||||
name: 'workerFk',
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Workers/search',
|
||||
|
@ -100,7 +100,6 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
name: 'categoryFk',
|
||||
label: t('ItemCategory'),
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
options: itemCategoriesOptions.value,
|
||||
|
@ -112,7 +111,6 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
name: 'Temperature',
|
||||
label: t('Temperature'),
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
options: temperatureOptions.value,
|
||||
|
@ -180,6 +178,33 @@ const columns = computed(() => [
|
|||
<WorkerDescriptorProxy :id="row.workerFk" />
|
||||
</span>
|
||||
</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>
|
||||
</template>
|
||||
</VnSection>
|
||||
|
|
|
@ -8,15 +8,11 @@ describe('Item type', () => {
|
|||
|
||||
it('should throw an error if the code already exists', () => {
|
||||
cy.dataCy('vnTableCreateBtn').click();
|
||||
cy.get(
|
||||
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
|
||||
).type('ALS');
|
||||
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.dataCy('codeInput').type('ALS');
|
||||
cy.dataCy('nameInput').type('Alstroemeria');
|
||||
cy.dataCy('workerSelect').type('employeeNick');
|
||||
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.dataCy('FormModelPopup_save').click();
|
||||
cy.checkNotification('An item type with the same code already exists');
|
||||
|
@ -24,15 +20,11 @@ describe('Item type', () => {
|
|||
|
||||
it('should create a new type', () => {
|
||||
cy.dataCy('vnTableCreateBtn').click();
|
||||
cy.get(
|
||||
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
|
||||
).type('LIL');
|
||||
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.dataCy('codeInput').type('LIL');
|
||||
cy.dataCy('nameInput').type('Lilium');
|
||||
cy.dataCy('workerSelect').type('buyerNick');
|
||||
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.dataCy('FormModelPopup_save').click();
|
||||
cy.checkNotification('Data created');
|
||||
|
|
Loading…
Reference in New Issue