Skip to content

Commit eab87de

Browse files
Samuli RasiSamuli Rasi
Samuli Rasi
authored and
Samuli Rasi
committed
Add missing tags
1 parent 3549f3a commit eab87de

File tree

1 file changed

+50
-38
lines changed

1 file changed

+50
-38
lines changed

cypress/e2e/routeStops.cy.ts

+50-38
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('Line details page: stops on route', () => {
161161

162162
it(
163163
'Verify that stops of route are shown on its list view',
164-
{ tags: [Tag.Stops, Tag.Routes] },
164+
{ tags: [Tag.Stops, Tag.Routes, Tag.Smoke] },
165165
() => {
166166
routeStopsTable.toggleRouteSection(routes[0].label);
167167

@@ -178,39 +178,47 @@ describe('Line details page: stops on route', () => {
178178
},
179179
);
180180

181-
it('User can add stops to route and remove those', () => {
182-
routeStopsTable.toggleRouteSection(routes[0].label);
181+
it(
182+
'User can add stops to route and remove those',
183+
{ tags: Tag.Stops },
184+
() => {
185+
routeStopsTable.toggleRouteSection(routes[0].label);
183186

184-
routeStopsTable.toggleUnusedStops();
187+
routeStopsTable.toggleUnusedStops();
185188

186-
routeStopsTable.addStopToRoute(stopLabels[2]);
187-
cy.wait('@gqlUpdateRouteJourneyPattern')
188-
.its('response.statusCode')
189-
.should('equal', 200);
190-
// Wait until cache is updated and UI notices that this stop is
191-
// now included on route
192-
routeStopsTable
193-
.getStopRow(stopLabels[2])
194-
.contains('Ei reitin käytössä')
195-
.should('not.exist');
189+
routeStopsTable.addStopToRoute(stopLabels[2]);
190+
cy.wait('@gqlUpdateRouteJourneyPattern')
191+
.its('response.statusCode')
192+
.should('equal', 200);
193+
// Wait until cache is updated and UI notices that this stop is
194+
// now included on route
195+
routeStopsTable
196+
.getStopRow(stopLabels[2])
197+
.contains('Ei reitin käytössä')
198+
.should('not.exist');
196199

197-
routeStopsTable.removeStopFromRoute(stopLabels[1]);
198-
cy.wait('@gqlUpdateRouteJourneyPattern')
199-
.its('response.statusCode')
200-
.should('equal', 200);
200+
routeStopsTable.removeStopFromRoute(stopLabels[1]);
201+
cy.wait('@gqlUpdateRouteJourneyPattern')
202+
.its('response.statusCode')
203+
.should('equal', 200);
201204

202-
routeStopsTable.getStopRow(stopLabels[1]).contains('Ei reitin käytössä');
203-
});
205+
routeStopsTable.getStopRow(stopLabels[1]).contains('Ei reitin käytössä');
206+
},
207+
);
204208

205-
it('User cannot delete too many stops from route', () => {
206-
routeStopsTable.toggleRouteSection(routes[0].label);
207-
// Route has only 2 stops so user shouldn't be able to remove either of those
208-
routeStopsTable.removeStopFromRoute(stopLabels[0]);
209-
toast
210-
.getDangerToast()
211-
.contains('Reitillä on oltava ainakin kaksi pysäkkiä.')
212-
.should('be.visible');
213-
});
209+
it(
210+
'User cannot delete too many stops from route',
211+
{ tags: Tag.Stops },
212+
() => {
213+
routeStopsTable.toggleRouteSection(routes[0].label);
214+
// Route has only 2 stops so user shouldn't be able to remove either of those
215+
routeStopsTable.removeStopFromRoute(stopLabels[0]);
216+
toast
217+
.getDangerToast()
218+
.contains('Reitillä on oltava ainakin kaksi pysäkkiä.')
219+
.should('be.visible');
220+
},
221+
);
214222

215223
it(
216224
'Should add Via info to a stop and then remove it',
@@ -250,15 +258,19 @@ describe('Line details page: stops on route', () => {
250258
},
251259
);
252260

253-
it('Checking "Use Hastus place" should not be possible when the stop has no timing place', () => {
254-
routeStopsTable.toggleRouteSection(routes[0].label);
255-
// This stop does not have a timing place
256-
// so it should not be possible to enable 'Use Hastus place'
257-
routeStopsTable.openTimingSettingsForm(stopLabels[0]);
258-
routeStopsTable.timingSettingsForm
259-
.getIsUsedAsTimingPointCheckbox()
260-
.should('be.disabled');
261-
});
261+
it(
262+
'Checking "Use Hastus place" should not be possible when the stop has no timing place',
263+
{ tags: Tag.Stops },
264+
() => {
265+
routeStopsTable.toggleRouteSection(routes[0].label);
266+
// This stop does not have a timing place
267+
// so it should not be possible to enable 'Use Hastus place'
268+
routeStopsTable.openTimingSettingsForm(stopLabels[0]);
269+
routeStopsTable.timingSettingsForm
270+
.getIsUsedAsTimingPointCheckbox()
271+
.should('be.disabled');
272+
},
273+
);
262274

263275
it(
264276
'Should set stop as timing place, regulated timing place and allow loading time',

0 commit comments

Comments
 (0)