Skip to content

Commit e77c93c

Browse files
Fix flaky BuildBuildPageTest (#3621)
`BuildBuildPageTest` has failed ~4% of the time across recent CI runs. While I haven't been able to reproduce the failure locally myself, the failure pattern seems to be correlated with clicking on the the collapsible subproject headers. I suspect this is due to the click location not always clicking on the summary element. This changes the behavior to explicitly click on the summary, thus opening the expandable component.
1 parent c92613b commit e77c93c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/Browser/Pages/BuildBuildPageTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public function testShowsListOfSubProjects(): void
479479
->waitForText($this->subproject2->name)
480480
->assertDontSee($buildError1->stdoutput)
481481
->assertDontSee($buildError2->stdoutput)
482-
->click('@collapse-' . $this->subproject1->id)
482+
->click('@collapse-' . $this->subproject1->id . ' summary')
483483
->assertSee($buildError1->stdoutput)
484484
->assertDontSee($buildError2->stdoutput)
485485
;
@@ -779,7 +779,7 @@ public function testShowsNewAndFixedWarningsBySubproject(): void
779779
): void {
780780
$browser->visit("/builds/{$current_parent_build->id}/build")
781781
->waitForText($this->subproject1->name)
782-
->click('@collapse-' . $this->subproject1->id)
782+
->click('@collapse-' . $this->subproject1->id . ' summary')
783783
->with('@collapse-' . $this->subproject1->id, function (Browser $browser) use (
784784
$buildError1,
785785
$buildError2,
@@ -793,7 +793,7 @@ public function testShowsNewAndFixedWarningsBySubproject(): void
793793
->assertSee($buildError4->stdoutput)
794794
;
795795
})
796-
->click('@collapse-' . $this->subproject2->id)
796+
->click('@collapse-' . $this->subproject2->id . ' summary')
797797
->with('@collapse-' . $this->subproject2->id, function (Browser $browser) use (
798798
$buildError1,
799799
$buildError2,
@@ -811,7 +811,7 @@ public function testShowsNewAndFixedWarningsBySubproject(): void
811811

812812
$browser->visit("/builds/{$current_parent_build->id}/build?onlydeltap")
813813
->waitForText($this->subproject1->name)
814-
->click('@collapse-' . $this->subproject1->id)
814+
->click('@collapse-' . $this->subproject1->id . ' summary')
815815
->with('@collapse-' . $this->subproject1->id, function (Browser $browser) use (
816816
$buildError1,
817817
$buildError2,
@@ -825,7 +825,7 @@ public function testShowsNewAndFixedWarningsBySubproject(): void
825825
->assertSee($buildError4->stdoutput)
826826
;
827827
})
828-
->click('@collapse-' . $this->subproject2->id)
828+
->click('@collapse-' . $this->subproject2->id . ' summary')
829829
->with('@collapse-' . $this->subproject2->id, function (Browser $browser) use (
830830
$buildError1,
831831
$buildError2,
@@ -843,7 +843,7 @@ public function testShowsNewAndFixedWarningsBySubproject(): void
843843

844844
$browser->visit("/builds/{$current_parent_build->id}/build?onlydeltan")
845845
->waitForText($this->subproject1->name)
846-
->click('@collapse-' . $this->subproject1->id)
846+
->click('@collapse-' . $this->subproject1->id . ' summary')
847847
->with('@collapse-' . $this->subproject1->id, function (Browser $browser) use (
848848
$buildError1,
849849
$buildError2,
@@ -857,7 +857,7 @@ public function testShowsNewAndFixedWarningsBySubproject(): void
857857
->assertDontSee($buildError4->stdoutput)
858858
;
859859
})
860-
->click('@collapse-' . $this->subproject2->id)
860+
->click('@collapse-' . $this->subproject2->id . ' summary')
861861
->with('@collapse-' . $this->subproject2->id, function (Browser $browser): void {
862862
$browser->waitForText('No fixed errors or warnings for this build.');
863863
})

0 commit comments

Comments
 (0)