($props.useLike ? { like: `%${val}%` } : val);
.q-field--outlined {
max-width: 100%;
}
+.q-field__inner {
+ .q-field__control {
+ min-height: auto !important;
+
+ display: flex;
+ align-items: flex-end;
+ .q-field__native.row {
+ min-height: auto !important;
+ }
+ }
+}
diff --git a/src/components/common/VnSelectDialog.vue b/src/components/common/VnSelectDialog.vue
index 17f8932553..350aa92723 100644
--- a/src/components/common/VnSelectDialog.vue
+++ b/src/components/common/VnSelectDialog.vue
@@ -1,5 +1,5 @@
-
-
-
-
-
diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue
index 4750a8417b..0e80135868 100644
--- a/src/pages/Entry/EntryStockBought.vue
+++ b/src/pages/Entry/EntryStockBought.vue
@@ -47,7 +47,7 @@ const columns = [
},
},
{
- align: 'left',
+ align: 'center',
label: t('Reserve'),
name: 'reserve',
columnFilter: false,
@@ -76,7 +76,7 @@ const columns = [
name: 'tableActions',
actions: [
{
- title: t('More'),
+ title: t('View more details'),
icon: 'search',
isPrimary: true,
action: (row) => {
@@ -141,6 +141,10 @@ function setFooter(data) {
});
tableRef.value.footer = footer;
}
+
+function round(value) {
+ return Math.round(value * 100) / 100;
+}
@@ -152,7 +156,9 @@ function setFooter(data) {
:filter="filter"
@on-fetch="
(data) => {
- travel = data.find((data) => data.warehouseIn.code === 'VNH');
+ travel = data.find(
+ (data) => data.warehouseIn.code.toLowerCase() === 'vnh'
+ );
}
"
/>
@@ -206,7 +212,7 @@ function setFooter(data) {
-
+
@@ -243,7 +250,7 @@ function setFooter(data) {
- {{ tableRef.footer.reserve }}
+ {{ round(tableRef.footer.reserve) }}
@@ -253,11 +260,11 @@ function setFooter(data) {
tableRef.footer.reserve < tableRef.footer.bought,
}"
>
- {{ tableRef.footer.bought }}
+ {{ round(tableRef.footer.bought) }}
-
+
diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue
index 5157d957be..3dc5652512 100644
--- a/src/pages/InvoiceOut/InvoiceOutList.vue
+++ b/src/pages/InvoiceOut/InvoiceOutList.vue
@@ -27,13 +27,16 @@ const { openReport } = usePrintService();
const columns = computed(() => [
{
- align: 'left',
+ align: 'center',
name: 'id',
label: t('invoiceOutList.tableVisibleColumns.id'),
chip: {
condition: () => true,
},
isId: true,
+ columnFilter: {
+ name: 'search',
+ },
},
{
align: 'left',
diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue
index fddf154a2d..7d4d6b8963 100644
--- a/src/pages/Item/ItemFixedPrice.vue
+++ b/src/pages/Item/ItemFixedPrice.vue
@@ -514,7 +514,7 @@ function handleOnDataSave({ CrudModelRef }) {
-
+
[
condition: () => true,
},
isId: true,
+ columnFilter: false,
},
{
align: 'left',
label: t('globals.name'),
name: 'name',
isTitle: true,
+ columnFilter: false,
+ columnClass: 'expand',
},
{
align: 'left',
@@ -70,18 +73,33 @@ const columns = computed(() => [
data-key="AgencyList"
:expr-builder="exprBuilder"
/>
-
+
+
es:
isOwn: Tiene propietario
diff --git a/src/pages/Route/Card/RouteListTicketsDialog.vue b/src/pages/Route/Card/RouteListTicketsDialog.vue
index ba07f859f2..b9b2ee36bd 100644
--- a/src/pages/Route/Card/RouteListTicketsDialog.vue
+++ b/src/pages/Route/Card/RouteListTicketsDialog.vue
@@ -167,8 +167,8 @@ const setTicketsRoute = async () => {
{{ props.value }}
-
+
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
new file mode 100644
index 0000000000..51da4ec12d
--- /dev/null
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -0,0 +1,360 @@
+
+
+
+
+
+
+
+ {{ t('route.Select the starting date') }}
+
+
+
+
+
+
+
+
+ {{ t('globals.clone') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('route.Clone Selected Routes') }}
+
+
+ {{ t('route.Download selected routes as PDF') }}
+
+
+ {{ t('route.Mark as served') }}
+
+
+
+
diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue
index 1e20df99c7..d0feb9a658 100644
--- a/src/pages/Route/RouteList.vue
+++ b/src/pages/Route/RouteList.vue
@@ -1,34 +1,19 @@
-
-
-
-
- {{ t('Select the starting date') }}
-
-
-
-
-
-
-
-
- {{ t('globals.clone') }}
-
-
-
-
-
-
-
- {{ t('Clone Selected Routes') }}
-
-
- {{ t('Download selected routes as PDF') }}
-
-
- {{ t('Mark as served') }}
-
+
+
+ {{ row?.workerUserName }}
+
+
-
-
-
-en:
- newRoute: New Route
- hourStarted: Started hour
- hourFinished: Finished hour
-es:
- From: Desde
- To: Hasta
- Worker: Trabajador
- Agency: Agencia
- Vehicle: Vehículo
- Volume: Volumen
- Date: Fecha
- Description: Descripción
- Hour started: Hora inicio
- Hour finished: Hora fin
- KmStart: Km inicio
- KmEnd: Km fin
- Served: Servida
- newRoute: Nueva Ruta
- Clone Selected Routes: Clonar rutas seleccionadas
- Select the starting date: Seleccione la fecha de inicio
- Stating date: Fecha de inicio
- Cancel: Cancelar
- Mark as served: Marcar como servidas
- Download selected routes as PDF: Descargar rutas seleccionadas como PDF
- Add ticket: Añadir tickets
- Preview: Vista previa
- Summary: Resumen
- Route is closed: La ruta está cerrada
- Route is not served: La ruta no está servida
- hourStarted: Hora de inicio
- hourFinished: Hora de fin
-
diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue
index d921dab1f4..3687442f57 100644
--- a/src/pages/Route/RouteRoadmap.vue
+++ b/src/pages/Route/RouteRoadmap.vue
@@ -87,7 +87,7 @@ const columns = computed(() => [
actions: [
{
title: t('Ver cmr'),
- icon: 'visibility',
+ icon: 'preview',
isPrimary: true,
action: (row) => viewSummary(row?.id, RoadmapSummary),
},
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
index 5960636b08..3bdad4fecc 100644
--- a/src/pages/Route/RouteTickets.vue
+++ b/src/pages/Route/RouteTickets.vue
@@ -342,10 +342,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
{{ t('Open buscaman') }}
@@ -353,7 +350,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
@@ -361,7 +358,7 @@ const openSmsDialog = async () => {
-
+
{{ value }}
diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml
new file mode 100644
index 0000000000..617d704d2b
--- /dev/null
+++ b/src/pages/Route/locale/en.yml
@@ -0,0 +1,25 @@
+route:
+ Worker: Worker
+ Agency: Agency
+ Vehicle: Vehicle
+ Description: Description
+ hourStarted: H.Start
+ hourFinished: H.End
+ createRoute: Create route
+ From: From
+ To: To
+ Date: Date
+ KmStart: Km start
+ KmEnd: Km end
+ Served: Served
+ Clone Selected Routes: Clone selected routes
+ Select the starting date: Select the starting date
+ Stating date: Starting date
+ Cancel: Cancel
+ Mark as served: Mark as served
+ Download selected routes as PDF: Download selected routes as PDF
+ Add ticket: Add ticket
+ Preview: Preview
+ Summary: Summary
+ Route is closed: Route is closed
+ Route is not served: Route is not served
diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml
new file mode 100644
index 0000000000..ed96ad9158
--- /dev/null
+++ b/src/pages/Route/locale/es.yml
@@ -0,0 +1,25 @@
+route:
+ Worker: Trabajador
+ Agency: Agencia
+ Vehicle: Vehículo
+ Description: Descripción
+ hourStarted: H.Inicio
+ hourFinished: H.Fin
+ createRoute: Crear ruta
+ From: Desde
+ To: Hasta
+ Date: Fecha
+ KmStart: Km inicio
+ KmEnd: Km fin
+ Served: Servida
+ Clone Selected Routes: Clonar rutas seleccionadas
+ Select the starting date: Seleccione la fecha de inicio
+ Stating date: Fecha de inicio
+ Cancel: Cancelar
+ Mark as served: Marcar como servidas
+ Download selected routes as PDF: Descargar rutas seleccionadas como PDF
+ Add ticket: Añadir tickets
+ Preview: Vista previa
+ Summary: Resumen
+ Route is closed: La ruta está cerrada
+ Route is not served: La ruta no está servida
diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue
index f8fbba0e47..1774664784 100644
--- a/src/pages/Supplier/Card/SupplierAccounts.vue
+++ b/src/pages/Supplier/Card/SupplierAccounts.vue
@@ -113,6 +113,7 @@ const setWireTransfer = async () => {
option-label="bic"
option-value="id"
hide-selected
+ :roles-allowed-to-create="['financial']"
>
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
import { onMounted, ref, computed } from 'vue';
-import { useRoute, useRouter } from 'vue-router';
+import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import { dashIfEmpty, toDate, toCurrency } from 'src/filters';
@@ -12,6 +12,8 @@ import InvoiceOutDescriptorProxy from 'pages/InvoiceOut/Card/InvoiceOutDescripto
import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import { getUrl } from 'src/composables/getUrl';
+import useNotify from 'src/composables/useNotify.js';
+import { useArrayData } from 'composables/useArrayData';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
@@ -19,8 +21,7 @@ import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
const route = useRoute();
-const router = useRouter();
-
+const { notify } = useNotify();
const { t } = useI18n();
const $props = defineProps({
@@ -38,6 +39,8 @@ const ticket = computed(() => summaryRef.value?.entity);
const editableStates = ref([]);
const ticketUrl = ref();
const grafanaUrl = 'https://grafana.verdnatura.es';
+const stateBtnDropdownRef = ref();
+const descriptorData = useArrayData('ticketData');
onMounted(async () => {
ticketUrl.value = (await getUrl('ticket/')) + entityId.value + '/';
@@ -64,15 +67,19 @@ function isEditable() {
}
async function changeState(value) {
- if (!ticket.value.id) return;
-
- const formData = {
- ticketFk: ticket.value.id,
- code: value,
- };
-
- await axios.post(`Tickets/state`, formData);
- router.go(route.fullPath);
+ try {
+ stateBtnDropdownRef.value.hide();
+ const formData = {
+ ticketFk: entityId.value,
+ code: value,
+ };
+ await axios.post(`Tickets/state`, formData);
+ notify('globals.dataSaved', 'positive');
+ summaryRef.value?.fetch();
+ descriptorData.fetch({});
+ } catch (err) {
+ console.error('Error changing ticket state', err);
+ }
}
function getNoteValue(description) {
@@ -125,6 +132,7 @@ function toTicketUrl(section) {
diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue
index d7dce911b5..829eb3a171 100644
--- a/src/pages/Travel/Card/TravelSummary.vue
+++ b/src/pages/Travel/Card/TravelSummary.vue
@@ -319,7 +319,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
-
+
{{ value }}
diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue
index 6d83581eeb..38b9125b1e 100644
--- a/src/pages/Travel/Card/TravelThermographs.vue
+++ b/src/pages/Travel/Card/TravelThermographs.vue
@@ -47,6 +47,18 @@ const TableColumns = computed(() => {
name: 'temperatureFk',
align: 'left',
},
+ {
+ label: t('globals.maxTemperature'),
+ field: 'maxTemperature',
+ name: 'maxTemperature',
+ align: 'left',
+ },
+ {
+ label: t('globals.minTemperature'),
+ field: 'minTemperature',
+ name: 'minTemperature',
+ align: 'left',
+ },
{
label: t('travel.thermographs.state'),
field: 'result',
@@ -92,11 +104,7 @@ const openRemoveDialog = async (id) => {
},
})
.onOk(async () => {
- try {
- await removeThermograph(id);
- } catch (err) {
- console.error('Error removing thermograph');
- }
+ await removeThermograph(id);
});
};
@@ -106,9 +114,7 @@ const redirectToThermographForm = (action, id) => {
};
if (action === 'edit' && id) {
- const params = {};
- params.thermographId = id;
- routeDetails.params = params;
+ routeDetails.query = { travelThermographFk: id };
}
router.push(routeDetails);
};
@@ -213,4 +219,6 @@ es:
Thermograph removed: Termógrafo eliminado
Are you sure you want to remove the thermograph?: ¿Seguro que quieres quitar el termógrafo?
No results: Sin resultados
+ Max Temperature: Temperatura máxima
+ Min Temperature: Temperatura mínima
diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue
index 4f16b0a49d..42acf30b92 100644
--- a/src/pages/Travel/Card/TravelThermographsForm.vue
+++ b/src/pages/Travel/Card/TravelThermographsForm.vue
@@ -1,6 +1,6 @@
@@ -185,6 +167,18 @@ const onThermographCreated = async (data) => {
:filter="{ order: 'name' }"
auto-load
/>
+ (temperaturesOptions = data)"
+ auto-load
+ url="Temperatures"
+ />
+ (thermographsOptions = data)"
+ :filter="thermographFilter"
+ auto-load
+ />
{
(thermographForm.thermographId = data.id)
- "
+ @on-data-saved="onThermographCreated"
/>
@@ -271,6 +259,26 @@ const onThermographCreated = async (data) => {
option-label="name"
/>
+
+
+
+
+
+
{
-es:
- Select files: Selecciona ficheros
- Thermograph created: Termógrafo creado
- New thermograph: Nuevo termógrafo
+ es:
+ Select files: Selecciona ficheros
+ Thermograph created: Termógrafo creado
+ New thermograph: Nuevo termógrafo
diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue
index a0976e92c9..e56f5d2ff1 100644
--- a/src/pages/Travel/TravelList.vue
+++ b/src/pages/Travel/TravelList.vue
@@ -1,18 +1,14 @@
-
-
-
-
-
- {{ t('globals.collapseMenu') }}
-
-
-
-
-
import { onMounted, ref, computed, watch, onUnmounted } from 'vue';
import { useRoute } from 'vue-router';
-
+import VnInput from 'src/components/common/VnInput.vue';
import { useState } from 'src/composables/useState';
import axios from 'axios';
import { useArrayData } from 'composables/useArrayData';
@@ -144,7 +144,8 @@ watch(storeData, async (val) => {
});
const reFetch = async () => {
- await arrayData.fetch({ append: false });
+ const { data } = await arrayData.fetch({ append: false });
+ nodes.value = data;
};
onMounted(async () => {
@@ -182,6 +183,16 @@ onUnmounted(() => {
+
+
+
+
+
import('src/components/common/VnSectionMain.vue'),
- props: {
- leftDrawer: false,
- },
redirect: { name: 'RouteList' },
children: [
{
@@ -33,6 +37,15 @@ export default {
},
component: () => import('src/pages/Route/RouteList.vue'),
},
+ {
+ path: 'extended-list',
+ name: 'RouteExtendedList',
+ meta: {
+ title: 'RouteExtendedList',
+ icon: 'format_list_bulleted',
+ },
+ component: () => import('src/pages/Route/RouteExtendedList.vue'),
+ },
{
path: 'create',
name: 'RouteCreate',
@@ -78,7 +91,7 @@ export default {
name: 'AgencyList',
meta: {
title: 'agencyList',
- icon: 'view_list',
+ icon: 'list',
},
component: () =>
import('src/pages/Route/Agency/AgencyList.vue'),
diff --git a/test/cypress/integration/vnComponent/UserPanel.spec.js b/test/cypress/integration/vnComponent/UserPanel.spec.js
new file mode 100644
index 0000000000..e83d079540
--- /dev/null
+++ b/test/cypress/integration/vnComponent/UserPanel.spec.js
@@ -0,0 +1,58 @@
+///
+describe('UserPanel', () => {
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit(`/#dashboard`);
+ cy.waitForElement('.q-page', 6000);
+ });
+
+ it('should notify when update user warehouse', () => {
+ const userWarehouse =
+ '.q-menu .q-gutter-xs > :nth-child(3) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native> .q-field__input';
+
+ // Abro el panel
+ cy.openUserPanel();
+
+ // Compruebo la opcion inicial
+ cy.get(userWarehouse).should('have.value', 'VNL').click();
+
+ // Actualizo la opción
+ getOption(3);
+
+ //Compruebo la notificación
+ cy.get('.q-notification').should('be.visible');
+ cy.get(userWarehouse).should('have.value', 'VNH');
+
+ //Restauro el valor
+ cy.get(userWarehouse).click();
+ getOption(2);
+ });
+ it('should notify when update user company', () => {
+ const userCompany =
+ '.q-menu .q-gutter-xs > :nth-child(2) > .q-field--float > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native> .q-field__input';
+
+ // Abro el panel
+ cy.openUserPanel();
+
+ // Compruebo la opcion inicial
+ cy.get(userCompany).should('have.value', 'Warehouse One').click();
+
+ //Actualizo la opción
+ getOption(2);
+
+ //Compruebo la notificación
+ cy.get('.q-notification').should('be.visible');
+ cy.get(userCompany).should('have.value', 'Warehouse Two');
+
+ //Restauro el valor
+ cy.get(userCompany).click();
+ getOption(1);
+ });
+});
+
+function getOption(index) {
+ cy.waitForElement('[role="listbox"]');
+ const option = `[role="listbox"] .q-item:nth-child(${index})`;
+ cy.get(option).click();
+}
diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js
index 1872d3591c..78dc38899a 100644
--- a/test/cypress/integration/vnComponent/vnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/vnLocation.spec.js
@@ -3,25 +3,90 @@ describe('VnLocation', () => {
const dialogInputs = '.q-dialog label input';
const createLocationButton = '.q-form > .q-card > .vn-row:nth-child(6) .--add-icon';
const inputLocation = '.q-form input[aria-label="Location"]';
+ const createForm = {
+ prefix: '.q-dialog__inner > .column > #formModel > .q-card',
+ sufix: ' .q-field__inner > .q-field__control',
+ };
+ describe('CreateFormDialog ', () => {
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('developer');
+ cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
+ cy.waitForElement('.q-card');
+ cy.get(createLocationButton).click();
+ });
+ it('should filter provinces based on selected country', () => {
+ // Select a country
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(5)> ${createForm.sufix}`,
+ 'Ecuador'
+ );
+ // Verify that provinces are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+
+ // Verify that towns are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(4) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+ });
+
+ it('should filter towns based on selected province', () => {
+ // Select a country
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`,
+ 'Ecuador'
+ );
+ // Verify that provinces are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+
+ // Verify that towns are filtered
+ cy.get(
+ `${createForm.prefix} > :nth-child(4) > .q-field:nth-child(3)> ${createForm.sufix}`
+ ).should('have.length', 1);
+ });
+ it('should pass selected country', () => {
+ // Select a country
+ const country = 'Ecuador';
+ const province = 'Province five';
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(5) > .q-field:nth-child(5)> ${createForm.sufix}`,
+ country
+ );
+ cy.selectOption(
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
+ province
+ );
+ cy.get(
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon`
+ ).click();
+ cy.get(
+ `#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
+ ).should('have.value', province);
+ });
+ });
describe('Worker Create', () => {
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/worker/create', { timeout: 5000 });
cy.waitForElement('.q-card');
+ cy.get(inputLocation).click();
});
it('Show all options', function () {
- cy.get(inputLocation).click();
cy.get(locationOptions).should('have.length.at.least', 5);
});
it('input filter location as "al"', function () {
- cy.get(inputLocation).click();
+ // cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
cy.get(locationOptions).should('have.length.at.least', 4);
});
it('input filter location as "ecuador"', function () {
- cy.get(inputLocation).click();
+ // cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length.at.least', 1);
@@ -63,13 +128,11 @@ describe('VnLocation', () => {
cy.get(dialogInputs).eq(0).clear();
cy.get(dialogInputs).eq(0).type(postCode);
cy.selectOption(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control ',
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
province
);
cy.get('.q-mt-lg > .q-btn--standard').click();
- cy.get('.q-dialog__inner > .column > #formModel > .q-card').should(
- 'not.exist'
- );
+ cy.get(`${createForm.prefix}`).should('not.exist');
checkVnLocation(postCode, province);
});
it('Create city', () => {
@@ -79,7 +142,7 @@ describe('VnLocation', () => {
cy.get(dialogInputs).eq(0).type(postCode);
// city create button
cy.get(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon'
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
).click();
cy.selectOption('#q-portal--dialog--2 .q-select', 'one');
cy.get('#q-portal--dialog--2 .q-input').type(province);
@@ -89,9 +152,7 @@ describe('VnLocation', () => {
});
function checkVnLocation(postCode, province) {
- cy.get('.q-dialog__inner > .column > #formModel > .q-card').should(
- 'not.exist'
- );
+ cy.get(`${createForm.prefix}`).should('not.exist');
cy.get('.q-form > .q-card > .vn-row:nth-child(6)')
.find('input')
.invoke('val')
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 43788f59f4..83f45b7211 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -248,3 +248,9 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
Cypress.Commands.add('openActionsDescriptor', () => {
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
});
+
+Cypress.Commands.add('openUserPanel', () => {
+ cy.get(
+ '.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
+ ).click();
+});