Пример #1
0
				Eventually(page.FindByLink("resource-name")).Should(BeFound())
				Expect(page.FindByLink("resource-name").Click()).To(Succeed())

				// resource detail -> paused resource detail
				Expect(page).Should(HaveURL(withPath("/resources/resource-name")))
				Expect(page.Find("h1")).To(HaveText("resource-name"))

				Authenticate(page, "admin", "password")

				Expect(page.Find(".js-resource .js-pauseUnpause").Click()).To(Succeed())
				Eventually(page.Find(".header i.fa-play")).Should(BeFound())

				page.Refresh()

				Eventually(page.Find(".header i.fa-play")).Should(BeFound())

				resource, err := pipelineDB.GetResource("resource-name")
				Ω(err).ShouldNot(HaveOccurred())

				err = pipelineDB.SetResourceCheckError(resource, errors.New("failed to foo the bar"))
				Ω(err).ShouldNot(HaveOccurred())

				page.Refresh()

				Eventually(page.Find(".header h3")).Should(HaveText("checking failed"))
				Eventually(page.Find(".build-step .step-body")).Should(HaveText("failed to foo the bar"))
			})
		})
	})
})