From e490e9528b771382ff56bc66174d9281972d6566 Mon Sep 17 00:00:00 2001 From: PHAM HOANG HUNG Date: Tue, 15 Oct 2024 17:42:34 +0700 Subject: [PATCH 1/2] fix test --- .../com/axon/docfactory/demos/WebTestApiExamplesIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java b/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java index e5a08b0e..e5b818dd 100644 --- a/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java +++ b/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java @@ -79,7 +79,8 @@ void ivyDocApi(WebAppFixture fixture) { $(withText("Task End")).shouldBe(visible); open(EngineUrl.create().path("tasks").toUrl()); - $(By.linkText("Task: View attached document")).shouldBe(visible).click(); + $(By.id("tasksForm:tasks:0:taskName")).shouldBe(visible).click(); + $(By.id("actionMenuForm:taskStartBtn")).shouldBe(visible).click(); Selenide.switchTo().frame("iFrame"); $("h3").shouldHave(exactText("DocFactoryDemos: Attached Document")); $("iframe").shouldBe(visible); From 44df56413fa61ae69941f55f9970e42e97621287 Mon Sep 17 00:00:00 2001 From: PHAM HOANG HUNG Date: Wed, 16 Oct 2024 09:11:51 +0700 Subject: [PATCH 2/2] fix test --- .../com/axon/docfactory/demos/WebTestApiExamplesIT.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java b/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java index e5b818dd..e981d2f1 100644 --- a/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java +++ b/doc-factory-demos-test/src_test/com/axon/docfactory/demos/WebTestApiExamplesIT.java @@ -20,6 +20,7 @@ import com.codeborne.selenide.Configuration; import com.codeborne.selenide.FileDownloadMode; import com.codeborne.selenide.Selenide; +import com.codeborne.selenide.SelenideElement; @IvyWebTest class WebTestApiExamplesIT { @@ -80,7 +81,10 @@ void ivyDocApi(WebAppFixture fixture) { open(EngineUrl.create().path("tasks").toUrl()); $(By.id("tasksForm:tasks:0:taskName")).shouldBe(visible).click(); - $(By.id("actionMenuForm:taskStartBtn")).shouldBe(visible).click(); + SelenideElement taskStartBtn = $(By.id("actionMenuForm:taskStartBtn")); + if (taskStartBtn.isDisplayed()) { + taskStartBtn.shouldBe(visible).click(); + } Selenide.switchTo().frame("iFrame"); $("h3").shouldHave(exactText("DocFactoryDemos: Attached Document")); $("iframe").shouldBe(visible);