fix: #8417 fixed claimPhoto e2e test #1512

Merged
provira merged 26 commits from 8417-e2eClaimPhoto into dev 2025-03-05 07:26:55 +00:00
7 changed files with 71 additions and 7 deletions
Showing only changes of commit 15db69be9c - Show all commits

View File

@ -681,6 +681,7 @@ const rowCtrlClickFunction = computed(() => {
@update:selected="emit('update:selected', $event)"
@selection="(details) => handleSelection(details, rows)"
:hide-selected-banner="true"
:data-cy="$props.dataCy ?? 'vnTable'"
>
<template #top-left v-if="!$props.withoutHeader">
<slot name="top-left"> </slot>

View File

@ -656,7 +656,6 @@ onMounted(() => {
:without-header="!editableMode"
:with-filters="editableMode"
:right-search="editableMode"
:right-search-icon="true"
:row-click="false"
:columns="columns"
:beforeSaveFn="beforeSave"

View File

@ -22,7 +22,12 @@ const links = {
};
</script>
<template>
<CardSummary data-key="Vehicle" :url="`Vehicles/${entityId}`" :filter="VehicleFilter">
<CardSummary
data-key="Vehicle"
:url="`Vehicles/${entityId}`"
module-name="Vehicle"
:filter="VehicleFilter"
>
<template #header="{ entity }">
<div>{{ entity.id }} - {{ entity.numberPlate }}</div>
</template>

View File

@ -1,4 +1,4 @@
describe.skip('Entry', () => {
describe('Entry', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('buyer');

View File

@ -1,4 +1,4 @@
describe.skip('EntryStockBought', () => {
describe('EntryStockBought', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('buyer');
@ -16,9 +16,9 @@ describe.skip('EntryStockBought', () => {
cy.get('input[aria-label="Reserve"]').type('1');
cy.get('input[aria-label="Date"]').eq(1).clear();
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
cy.get('input[aria-label="Buyer"]').type('buyerBossNick');
cy.get('input[aria-label="Buyer"]').type('itNick');
cy.get('div[role="listbox"] > div > div[role="option"]')
.eq(0)
.eq(1)
.should('be.visible')
.click();

View File

@ -0,0 +1,59 @@
describe('Vehicle list', () => {
const selectors = {
saveFormBtn: 'FormModelPopup_save',
summaryPopupBtn: 'tr:last-child > .q-table--col-auto-width > .q-btn',
summaryGoToSummaryBtn: '.header > .q-icon',
summaryHeader: '.summaryHeader > div',
numberPlate: 'tr:last-child > [data-col-field="numberPlate"] > .no-padding',
};
const data = {
'Nº Plate': { val: '9465-LPA' },
'Trade Mark': { val: 'WAYNE INDUSTRIES' },
Model: { val: 'BATREMOLQUE' },
Type: { val: 'remolque', type: 'select' },
Warehouse: { val: 'Warehouse One', type: 'select' },
Country: { val: 'Portugal', type: 'select' },
Description: { val: 'Exclusive for batpod transport' },
};
const expected = data['Nº Plate'].val;
const summaryUrl = '/summary';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/route/vehicle/list`);
cy.typeSearchbar('{enter}');
});
it('should list vehicles', () => {
cy.get('.q-table')
.children()
.should('be.visible')
.should('have.length.greaterThan', 0);
});
it('Should add new vehicle', () => {
cy.addBtnClick();
cy.fillInForm(data);
cy.dataCy(selectors.saveFormBtn).should('be.visible').click();
cy.checkNotification('Data created');
cy.get(selectors.summaryHeader).should('contain', expected);
cy.url().should('include', summaryUrl);
});
it('should open summary by clicking a vehicle', () => {
cy.get(selectors.numberPlate).click();
cy.get(selectors.summaryHeader).should('contain', expected);
cy.url().should('include', summaryUrl);
});
it('should redirect to vehicle summary when click summary icon on summary pop-up', () => {
cy.get(selectors.summaryPopupBtn).click();
cy.get(selectors.summaryHeader).should('contain', expected);
cy.get(selectors.summaryGoToSummaryBtn).click();
cy.url().should('include', summaryUrl);
});
});

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" />
describe.skip('TicketList', () => {
describe('TicketList', () => {
const firstRow = 'tbody > :nth-child(1)';
beforeEach(() => {