0
0
Fork 0

fix: refs #7193 fixed e2e test

This commit is contained in:
Jon Elias 2024-10-28 11:37:32 +01:00
parent df1c123444
commit 2cde850132
1 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,6 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe('ParkingList', () => { describe('ParkingList', () => {
const searchbar = '#searchbar input';
const firstCard = '.q-card:nth-child(1)'; const firstCard = '.q-card:nth-child(1)';
const firstChipId = const firstChipId =
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content'; ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
@ -14,6 +15,7 @@ describe('ParkingList', () => {
}); });
it('should redirect on clicking a parking', () => { it('should redirect on clicking a parking', () => {
cy.get(searchbar).type('{enter}');
cy.get(firstChipId) cy.get(firstChipId)
.invoke('text') .invoke('text')
.then((content) => { .then((content) => {
@ -24,6 +26,7 @@ describe('ParkingList', () => {
}); });
it('should open the details', () => { it('should open the details', () => {
cy.get(searchbar).type('{enter}');
cy.get(firstDetailBtn).click(); cy.get(firstDetailBtn).click();
cy.get(summaryHeader).contains('Basic data'); cy.get(summaryHeader).contains('Basic data');
}); });