diff --git a/src/components/common/VnSelectWorker.vue b/src/components/common/VnSelectWorker.vue
index 8d60eb014..961804be1 100644
--- a/src/components/common/VnSelectWorker.vue
+++ b/src/components/common/VnSelectWorker.vue
@@ -53,6 +53,7 @@ const url = computed(() => {
:fields="['id', 'name', 'nickname', 'code']"
:filter-options="['id', 'name', 'nickname', 'code']"
sort-by="nickname ASC"
+ data-cy="vnWorkerSelect"
>
diff --git a/src/pages/Item/ItemTypeList.vue b/src/pages/Item/ItemTypeList.vue
index 93e98a8ae..d4030e1d8 100644
--- a/src/pages/Item/ItemTypeList.vue
+++ b/src/pages/Item/ItemTypeList.vue
@@ -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,29 @@ const columns = computed(() => [
+
+
+
+
+
+
+
diff --git a/test/cypress/integration/item/itemBarcodes.spec.js b/test/cypress/integration/item/itemBarcodes.spec.js
index 4d17fa260..844768d9e 100644
--- a/test/cypress/integration/item/itemBarcodes.spec.js
+++ b/test/cypress/integration/item/itemBarcodes.spec.js
@@ -1,5 +1,5 @@
///
-describe('Item shelving', () => {
+describe('ItemBarcodes', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
diff --git a/test/cypress/integration/item/itemType.spec.js b/test/cypress/integration/item/itemType.spec.js
index b0a7b0ca9..466a49708 100644
--- a/test/cypress/integration/item/itemType.spec.js
+++ b/test/cypress/integration/item/itemType.spec.js
@@ -1,5 +1,10 @@
///
describe('Item type', () => {
+ const workerError = 'employeeNick';
+ const worker = 'buyerNick';
+ const category = 'Artificial';
+ const type = 'Flower';
+
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
@@ -8,32 +13,24 @@ 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.get('.q-menu .q-item').contains('employeeNick').click();
- cy.dataCy('ItemCategory_select').type('Artificial');
- cy.get('.q-menu .q-item').contains('Artificial').click();
+ cy.dataCy('codeInput').type('ALS');
+ cy.dataCy('nameInput').type('Alstroemeria');
+ cy.dataCy('vnWorkerSelect').type(workerError);
+ cy.get('.q-menu .q-item').contains(workerError).click();
+ cy.dataCy('itemCategorySelect').type(category);
+ cy.get('.q-menu .q-item').contains(category).click();
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('An item type with the same code already exists');
});
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.get('.q-menu .q-item').contains('buyerNick').click();
- cy.dataCy('ItemCategory_select').type('Flower');
- cy.get('.q-menu .q-item').contains('Flower').click();
+ cy.dataCy('codeInput').type('LIL');
+ cy.dataCy('nameInput').type('Lilium');
+ cy.dataCy('vnWorkerSelect').type(worker);
+ cy.get('.q-menu .q-item').contains(worker).click();
+ cy.dataCy('itemCategorySelect').type(type);
+ cy.get('.q-menu .q-item').contains(type).click();
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('Data created');
});