From ef0975a4696b54656e2053ae8f817d9d4305337e Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Fri, 2 Jun 2023 09:12:20 -0500 Subject: [PATCH 1/3] chore: Added scroll to save button --- .../integration/pages/pipelines/LaunchPipelinePage.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java index 4cf48e8b4f..163822f278 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java @@ -10,6 +10,7 @@ import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.ExpectedConditions; @@ -187,12 +188,14 @@ public boolean isModifiedAlertVisible() { } public void saveModifiedTemplateAs(String name) { - driver.manage().window().maximize(); - // Fixes issue where save button scrolled off page. - driver.findElement(By.tagName("body")).sendKeys(Keys.HOME); WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(20L)); + // Scroll to the modified alert WebElement modifiedSaveAsButton = driver.findElement(By.className("t-modified-saveas")); + Actions actions = new Actions(driver); + actions.moveToElement(modifiedSaveAsButton); + actions.perform(); + modifiedSaveAsButton.click(); WebElement saveTemplatePopover = wait.until( ExpectedConditions.visibilityOfElementLocated(By.className("t-save-params-form"))); From 6080c36166458c6c8eab693e46141d468af694eb Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Fri, 2 Jun 2023 09:40:07 -0500 Subject: [PATCH 2/3] chore: Updated check to ensure the alert has gone away --- .../ria/integration/pages/pipelines/LaunchPipelinePage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java index 163822f278..dc7d6cac19 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/integration/pages/pipelines/LaunchPipelinePage.java @@ -188,7 +188,8 @@ public boolean isModifiedAlertVisible() { } public void saveModifiedTemplateAs(String name) { - WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(20L)); + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(2L)); + WebElement alertBox = driver.findElement(By.className("t-modified-alert")); // Scroll to the modified alert WebElement modifiedSaveAsButton = driver.findElement(By.className("t-modified-saveas")); @@ -201,7 +202,7 @@ public void saveModifiedTemplateAs(String name) { ExpectedConditions.visibilityOfElementLocated(By.className("t-save-params-form"))); modifiedNameInput.sendKeys(name); saveTemplatePopover.findElement(By.tagName("button")).click(); - wait.until(ExpectedConditions.invisibilityOf(modifiedAlert.get(0))); + wait.until(ExpectedConditions.invisibilityOf(alertBox)); } public String getSelectedParametersTemplateName() { From 451aefb88419c0f74ef851ab7e20cefd91e9089b Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Fri, 2 Jun 2023 10:03:39 -0500 Subject: [PATCH 3/3] chore: Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2776e6f7ce..64d0d6b6f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * [Developer]: Added script to do initial cleanup of sequence files from file system. [See PR 1469](https://github.com/phac-nml/irida/pull/1469) * [UI]: Add identifier to project drop-down on project synchronization page. See [PR 1474](https://github.com/phac-nml/irida/pull/1474) * [Developer]: Added functionality to delete sequence files from file storage when removed from sample. [See PR 1476](https://github.com/phac-nml/irida/pull/1476) +* [Developer]: Fixed flaky text in `PipelinesPhylogenomicsPageIT#testPageSetup` test. See [PR 1490](https://github.com/phac-nml/irida/pull/1492) ## [23.01.3] - 2023/05/09 * [Developer]: Fixed issue with metadata uploader removing existing data. See [PR 1489](https://github.com/phac-nml/irida/pull/1489)