Commit 1439b48 1 parent 74a2bcb commit 1439b48 Copy full SHA for 1439b48
File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class OperationalStudiesTimetablePage extends CommonPage {
94
94
95
95
// Verify that simulation results are displayed
96
96
async verifySimulationResultsVisibility ( ) : Promise < void > {
97
- await this . page . waitForLoadState ( 'networkidle' ) ;
97
+ await this . page . waitForLoadState ( 'networkidle' , { timeout : 30_000 } ) ;
98
98
99
99
const simulationResultsLocators = [
100
100
// TODO: remove this commented code when the design of simationBar has been changed
@@ -200,12 +200,13 @@ class OperationalStudiesTimetablePage extends CommonPage {
200
200
const trainCount = await this . timetableTrains . count ( ) ;
201
201
202
202
for ( let currentTrainIndex = 0 ; currentTrainIndex < trainCount ; currentTrainIndex += 1 ) {
203
- await this . page . waitForLoadState ( 'networkidle' ) ;
204
- await this . waitForSimulationResults ( ) ;
205
- const trainButton = OperationalStudiesTimetablePage . getTrainButton (
206
- this . timetableTrains . nth ( currentTrainIndex )
207
- ) ;
203
+ const trainElementHandle = this . timetableTrains . nth ( currentTrainIndex ) ;
204
+
205
+ await trainElementHandle . scrollIntoViewIfNeeded ( ) ;
206
+ await trainElementHandle . waitFor ( ) ;
207
+ const trainButton = OperationalStudiesTimetablePage . getTrainButton ( trainElementHandle ) ;
208
208
await trainButton . click ( { position : { x : 5 , y : 5 } } ) ;
209
+ await this . waitForSimulationResults ( ) ;
209
210
await this . verifySimulationResultsVisibility ( ) ;
210
211
}
211
212
}
You can’t perform that action at this time.
0 commit comments