fix: refs #8583 operator
This commit is contained in:
parent
eab18e4d14
commit
acc202386e
|
@ -13,7 +13,7 @@ export default defineConfig({
|
|||
videosFolder: 'test/cypress/videos',
|
||||
downloadsFolder: 'test/cypress/downloads',
|
||||
video: false,
|
||||
specPattern: 'test/cypress/integration/**/*.spec.js',
|
||||
specPattern: 'test/cypress/integration/worker/*.spec.js',
|
||||
experimentalRunAllSpecs: false,
|
||||
watchForFileChanges: false,
|
||||
reporter: 'cypress-mochawesome-reporter',
|
||||
|
|
|
@ -54,9 +54,8 @@ watch(
|
|||
selected.value = [];
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
{ immediate: true, deep: true },
|
||||
);
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -99,12 +98,14 @@ watch(
|
|||
<VnInput
|
||||
:label="t('worker.operator.numberOfWagons')"
|
||||
v-model="row.numberOfWagons"
|
||||
data-cy="numberOfWagons"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('worker.operator.train')"
|
||||
:options="trainsData"
|
||||
hide-selected
|
||||
v-model="row.trainFk"
|
||||
data-cy="train"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
@ -115,12 +116,14 @@ watch(
|
|||
option-label="code"
|
||||
option-value="code"
|
||||
v-model="row.itemPackingTypeFk"
|
||||
data-cy="itemPackingType"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('worker.operator.warehouse')"
|
||||
:options="warehousesData"
|
||||
hide-selected
|
||||
v-model="row.warehouseFk"
|
||||
data-cy="warehouse"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
@ -130,6 +133,7 @@ watch(
|
|||
hide-selected
|
||||
option-label="description"
|
||||
v-model="row.sectorFk"
|
||||
data-cy="sector"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('worker.operator.labeler')"
|
||||
|
@ -137,6 +141,7 @@ watch(
|
|||
hide-selected
|
||||
option-label="name"
|
||||
v-model="row.labelerFk"
|
||||
data-cy="labeler"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
@ -158,11 +163,13 @@ watch(
|
|||
:label="t('worker.operator.linesLimit')"
|
||||
v-model="row.linesLimit"
|
||||
lazy-rules
|
||||
data-cy="linesLimit"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('worker.operator.volumeLimit')"
|
||||
v-model="row.volumeLimit"
|
||||
lazy-rules
|
||||
data-cy="volumeLimit"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('WorkerLocker', () => {
|
||||
const userId = 1106;
|
||||
const nWagons = '4';
|
||||
const numberOfWagons = '[data-cy="numberOfWagons"]';
|
||||
const linesLimit = '[data-cy="linesLimit"]';
|
||||
const volumeLimit = '[data-cy="volumeLimit"]';
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('hr');
|
||||
cy.visit(`/#/worker/${userId}/operator`);
|
||||
});
|
||||
|
||||
it('should fill the operator form', () => {
|
||||
cy.get(numberOfWagons).type(nWagons);
|
||||
cy.get(linesLimit).type('6');
|
||||
cy.get(volumeLimit).type('3');
|
||||
cy.saveCard();
|
||||
|
||||
cy.checkNotification('Data saved');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue