@@ -164,4 +164,42 @@ void searchOffScreen(Page p, JenkinsConfiguredWithCodeRule j) throws Exception {
164164 .scrollToText ("Hello, world 1000!" )
165165 .scrollToText ("Hello, world 1!" );
166166 }
167+
168+ @ Test
169+ @ ConfiguredWithCode ("configure-appearance.yml" )
170+ void errorWithMessage (Page p , JenkinsConfiguredWithCodeRule j ) throws Exception {
171+ String name = "gh1169" ;
172+ WorkflowRun run = TestUtils .createAndRunJob (j , name , "gh1169_errorWithMessage.jenkinsfile" , Result .FAILURE );
173+
174+ // Note that the locator used in stageHasSteps accumulates the error step's message text content into the found
175+ // step name so we just check that instead of also calling stepContainText
176+ new PipelineJobPage (p , run .getParent ())
177+ .goTo ()
178+ .hasBuilds (1 )
179+ .nthBuild (0 )
180+ .goToBuild ()
181+ .goToPipelineOverview ()
182+ .hasStagesInGraph (1 , "Stage" )
183+ .selectStageInGraph ("Stage" )
184+ .stageHasSteps ("Error signalError" );
185+ }
186+
187+ @ Issue ("GH#1169" )
188+ @ Test
189+ @ ConfiguredWithCode ("configure-appearance.yml" )
190+ void errorWithNoMessage (Page p , JenkinsConfiguredWithCodeRule j ) throws Exception {
191+ String name = "gh1169" ;
192+ WorkflowRun run = TestUtils .createAndRunJob (j , name , "gh1169_errorWithNoMessage.jenkinsfile" , Result .FAILURE );
193+
194+ new PipelineJobPage (p , run .getParent ())
195+ .goTo ()
196+ .hasBuilds (1 )
197+ .nthBuild (0 )
198+ .goToBuild ()
199+ .goToPipelineOverview ()
200+ .hasStagesInGraph (1 , "Stage" )
201+ .selectStageInGraph ("Stage" )
202+ .stageHasSteps ("Error signal" )
203+ .stepDoesNotContainText ("Error signal" , "null" );
204+ }
167205}
0 commit comments