Skip to content

Commit 03e5afb

Browse files
committed
Add tests for stop owner search field
1 parent 0936851 commit 03e5afb

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

cypress/e2e/stop-registry/stopSearch.cy.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,9 @@ describe('Stop search', () => {
14021402
infoSpotA5: generateQuay(stopPlaceId, {
14031403
placeEquipments: { shelterEquipment: [shelterUrbanTemplate] },
14041404
}),
1405+
stopOwner: generateQuay(stopPlaceId, {
1406+
keyValues: [{ key: 'stopOwner', values: ['hkl'] }],
1407+
}),
14051408
};
14061409
}
14071410

@@ -1629,6 +1632,18 @@ describe('Stop search', () => {
16291632

16301633
shouldHaveResultWithout(stopsWithInfoSpots);
16311634
});
1635+
1636+
it('Should filter by stop owner', () => {
1637+
stopSearchBar.getExpandToggle().click();
1638+
stopSearchBar.getSearchInput().clearAndType('*');
1639+
1640+
stopSearchBar.stopOwner.openDropdown();
1641+
stopSearchBar.stopOwner.toggleOption('hkl');
1642+
stopSearchBar.getSearchButton().click();
1643+
expectGraphQLCallToSucceed('@gqlSearchStops');
1644+
1645+
shouldHaveResultOf(testStops.tagToPublicCode.stopOwner);
1646+
});
16321647
});
16331648

16341649
describe('Show results on map', () => {

cypress/pageObjects/stop-registry/search/StopSearchBar.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export class StopSearchBar {
2121

2222
stopState = new MultiselectDropDown('StopSearchBar::stopStateFilter');
2323

24+
stopOwner = new MultiselectDropDown('StopSearchBar::stopOwnerFilter');
25+
2426
transportationMode = new TransportationModeFilter();
2527

2628
getObservationDateInput() {

0 commit comments

Comments
 (0)