feat: refs #8593 added summary button & modified e2e tests
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
c49a72e5e5
commit
8f2e42ecbb
|
@ -26,10 +26,6 @@ const sectorFilter = { fields: ['id', 'description'] };
|
||||||
:label="$t('parking.pickingOrder')"
|
:label="$t('parking.pickingOrder')"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
|
||||||
<VnInput v-model="data.row" :label="$t('parking.row')" />
|
|
||||||
<VnInput v-model="data.column" :label="$t('parking.column')" />
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.sectorFk"
|
v-model="data.sectorFk"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, onUnmounted } from 'vue';
|
import { computed, onMounted, onUnmounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
|
@ -11,7 +10,6 @@ import exprBuilder from './ParkingExprBuilder.js';
|
||||||
import ParkingSummary from './Card/ParkingSummary.vue';
|
import ParkingSummary from './Card/ParkingSummary.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const router = useRouter();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const dataKey = 'ParkingList';
|
const dataKey = 'ParkingList';
|
||||||
|
@ -48,6 +46,19 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
label: '',
|
||||||
|
name: 'tableActions',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('components.smartCard.viewSummary'),
|
||||||
|
icon: 'preview',
|
||||||
|
action: (row) => viewSummary(row.id, ParkingSummary),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -8,18 +8,25 @@ describe('ParkingBasicData', () => {
|
||||||
cy.visit(`/#/shelving/parking/1/basic-data`);
|
cy.visit(`/#/shelving/parking/1/basic-data`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should give an error if the code aldready exists', () => {
|
||||||
|
cy.get(codeInput).eq(0).should('have.value', '700-01').clear();
|
||||||
|
cy.get(codeInput).eq(0).type('700-02');
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get('.q-notification__message').should('have.text', 'The code already exists');
|
||||||
|
});
|
||||||
|
|
||||||
it('should edit the code and sector', () => {
|
it('should edit the code and sector', () => {
|
||||||
cy.get(sectorSelect).type('First');
|
cy.get(sectorSelect).type('First');
|
||||||
cy.get(sectorOpt).click();
|
cy.get(sectorOpt).click();
|
||||||
|
|
||||||
cy.get(codeInput).eq(0).clear();
|
cy.get(codeInput).eq(0).clear();
|
||||||
cy.get(codeInput).eq(0).type('900-002');
|
cy.get(codeInput).eq(0).type('700-01');
|
||||||
cy.dataCy('Picking order_input').clear().type(80230);
|
cy.dataCy('Picking order_input').clear().type(80230);
|
||||||
|
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
cy.get(sectorSelect).should('have.value', 'Second sector');
|
cy.get(sectorSelect).should('have.value', 'First sector');
|
||||||
cy.get(codeInput).should('have.value', '900-002');
|
cy.get(codeInput).should('have.value', '700-01');
|
||||||
cy.dataCy('Picking order_input').should('have.value', 80230);
|
cy.dataCy('Picking order_input').should('have.value', 80230);
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -17,8 +17,8 @@ describe('ParkingList', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter and redirect if there is only one result', () => {
|
it('should filter and redirect if there is only one result', () => {
|
||||||
cy.dataCy('Code_input').type('01{enter}');
|
cy.dataCy('Code_input').type('1{enter}');
|
||||||
cy.dataCy('Sector_select').type('First{enter}');
|
cy.dataCy('Sector_select').type('Normal{enter}');
|
||||||
cy.get(summaryHeader).contains('Basic data');
|
cy.get(summaryHeader).contains('Basic data');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue