refactor: refs #8606 requested changes
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
147c8aed9e
commit
69e5495ccb
|
@ -45,7 +45,7 @@ export default defineConfig({
|
|||
videosFolder: 'test/cypress/videos',
|
||||
downloadsFolder: 'test/cypress/downloads',
|
||||
video: false,
|
||||
specPattern: 'test/cypress/integration/**/*.spec.js',
|
||||
specPattern: 'test/cypress/integration/zone/*.spec.js',
|
||||
experimentalRunAllSpecs: true,
|
||||
watchForFileChanges: true,
|
||||
reporter,
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import order from 'src/router/modules/order';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
exprBuilder: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const agencies = ref([]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="AgencyModes"
|
||||
:filter="{ fields: ['id', 'name'], order: ['name ASC'] }"
|
||||
@on-fetch="(data) => (agencies = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||
<template #tags="{ tag }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`filterPanel.${tag.label}`) }}: </strong>
|
||||
<span>{{ tag.value }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params, searchFn }">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('list.name')"
|
||||
v-model="params.name"
|
||||
is-outlined
|
||||
data-cy="zoneFilterPanelNameInput"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('filterPanel.agencyModeFk')"
|
||||
v-model="params.agencyModeFk"
|
||||
:options="agencies"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="searchFn()"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
data-cy="zoneFilterPanelAgencySelect"
|
||||
>
|
||||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('list.price')"
|
||||
v-model="params.price"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
|
@ -15,7 +15,6 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import ZoneFilterPanel from './ZoneFilterPanel.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
@ -206,9 +205,6 @@ const exprBuilder = (param, value) => {
|
|||
exprBuilder,
|
||||
}"
|
||||
>
|
||||
<template #advanced-menu>
|
||||
<ZoneFilterPanel :data-key="dataKey" />
|
||||
</template>
|
||||
<template #body>
|
||||
<div class="table-container">
|
||||
<div class="column items-center">
|
||||
|
@ -216,7 +212,6 @@ const exprBuilder = (param, value) => {
|
|||
ref="tableRef"
|
||||
:data-key="dataKey"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
redirect="Zone"
|
||||
:create="{
|
||||
urlCreate: 'Zones',
|
||||
|
|
|
@ -1,26 +1,18 @@
|
|||
describe('ZoneList', () => {
|
||||
const agency = 'inhouse pickup';
|
||||
const firstSummaryIcon =
|
||||
':nth-child(1) > .q-table--col-auto-width > [data-cy="tableAction-0"]';
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit('/#/zone/list');
|
||||
});
|
||||
|
||||
it('should filter by agency', () => {
|
||||
cy.dataCy('zoneFilterPanelAgencySelect').type(agency);
|
||||
cy.get('.q-menu .q-item').contains(agency).click();
|
||||
cy.get(':nth-child(1) > [data-col-field="agencyModeFk"]').should(
|
||||
'include.text',
|
||||
agency,
|
||||
);
|
||||
cy.typeSearchbar('{enter}');
|
||||
});
|
||||
|
||||
it('should open the zone summary', () => {
|
||||
cy.dataCy('zoneFilterPanelAgencySelect').type(agency);
|
||||
cy.get('.q-menu .q-item').contains(agency).click();
|
||||
cy.dataCy('tableAction-0').eq(1).click();
|
||||
cy.get(firstSummaryIcon).click();
|
||||
cy.get('.header > .q-icon').click();
|
||||
cy.url().should('include', 'zone/2/summary');
|
||||
cy.url().should('include', 'zone/1/summary');
|
||||
});
|
||||
|
||||
it('should clone the zone', () => {
|
||||
|
|
Loading…
Reference in New Issue