From 775c955543855eadf6092ead87f7da96da25fb79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 22:15:31 +0000 Subject: [PATCH 1/5] Bump whelk-io/maven-settings-xml-action from 20 to 21 Bumps [whelk-io/maven-settings-xml-action](https://github.com/whelk-io/maven-settings-xml-action) from 20 to 21. - [Release notes](https://github.com/whelk-io/maven-settings-xml-action/releases) - [Commits](https://github.com/whelk-io/maven-settings-xml-action/compare/v20...v21) --- updated-dependencies: - dependency-name: whelk-io/maven-settings-xml-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index bb5f8ac6..30c32167 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -248,7 +248,7 @@ jobs: path: ~/.m2 key: ${{runner.os}}-m2 - name: Create settings file - uses: whelk-io/maven-settings-xml-action@v20 + uses: whelk-io/maven-settings-xml-action@v21 with: profiles: '[{"id": "gpg", "properties": { "gpg.keyname": "${{secrets.GPG_KEYNAME_ID}}", "gpg.passphrase": "${{secrets.GPG_PASSPHRASE}}" }}]' servers: '[{"id": "ossrh", "username": "${{secrets.DEPLOY_PACKAGE_USERNAME}}", "password": "${{secrets.DEPLOY_PACKAGE_PASSWORD}}"}]' From e8e1e5a454b1be02ef50d6cf3e4dd3f7bba08801 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 2 Mar 2023 11:45:22 -0600 Subject: [PATCH 2/5] try to fix failing getLogging Test --- .../java/io/github/openmaqs/utilities/helper/ConfigUnitTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/helper/ConfigUnitTest.java b/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/helper/ConfigUnitTest.java index f6a8a611..957159b4 100644 --- a/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/helper/ConfigUnitTest.java +++ b/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/helper/ConfigUnitTest.java @@ -12,6 +12,7 @@ /** * The Configuration unit test class. */ +@Test(singleThreaded = true) public class ConfigUnitTest { /** From 4362429627af13c872f1193f695b5229edf57546 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 2 Mar 2023 11:57:07 -0600 Subject: [PATCH 3/5] delete commented out lines --- .../github/openmaqs/selenium/UIFindUnitTest.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java b/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java index 318fdcb1..f2ce9b35 100644 --- a/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java +++ b/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java @@ -42,7 +42,6 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void findElementFound() { -// UIFind find = setUp(); WebElement element = find.findElement(automationPageModel.automationNamesLabel); Assert.assertEquals(element.getText(),"Names"); } @@ -53,7 +52,6 @@ public void findElementFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementNotFound() { -// UIFind find = setUp(); Assert.assertNull(find.findElement(automationPageModel.notInPage, false)); } @@ -62,7 +60,6 @@ public void findElementNotFound() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findElementCatchException() { -// UIFind find = setUp(); find.findElement(automationPageModel.notInPage, true); } @@ -71,7 +68,6 @@ public void findElementCatchException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsFound() { -// UIFind find = setUp(); List list = find.findElements(automationPageModel.dropdownToggleClassSelector); Assert.assertEquals(list.size(),2, "There are 2 elements with dropdown classes"); @@ -89,7 +85,6 @@ public void findElementsFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFound() { -// UIFind find = setUp(); List list = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(list.size(), 0); } @@ -99,7 +94,6 @@ public void findElementsNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFoundThrowException() { -// UIFind find = setUp(); List elements = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(elements.size(), 0); } @@ -109,7 +103,6 @@ public void findElementsNotFoundThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextElementNotFound() { -// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.notInPage, "notInPage", false), "Element was not found"); } @@ -120,7 +113,6 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { -// UIFind find = setUp(); String text = find.findElement(automationPageModel.automationShowDialog1).getText(); Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), "Element was not found"); @@ -143,7 +135,6 @@ public void findElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithText() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "Red"), 3); } @@ -153,7 +144,6 @@ public void findIndexOfElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextNotFound() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "#notfound", false), -1); } @@ -164,7 +154,6 @@ public void findIndexOfElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextWithNotFoundElement() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.notInPage, "#notfound", false), -1); } @@ -175,7 +164,6 @@ public void findIndexOfElementWithTextWithNotFoundElement() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollection() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.flowerTable), "10 in"), 0); } @@ -185,7 +173,6 @@ public void findIndexOfElementInCollection() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findIndexOfElementInCollectionThrowException() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.notInPage), "not In page"), 0); } @@ -196,7 +183,6 @@ public void findIndexOfElementInCollectionThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionNotFound() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false), -1); } @@ -207,7 +193,6 @@ public void findIndexOfElementInCollectionNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionEmptyInputList() { -// UIFind find = UIFindFactory.getFind(this.getWebDriver()); int index = find.findIndexOfElementWithText( (List) null, "#notfound", false); Assert.assertEquals(index, -1); @@ -219,7 +204,6 @@ public void findIndexOfElementInCollectionEmptyInputList() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionTextNotFoundAssertIsTrue() { -// UIFind find = setUp(); int index = find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false); Assert.assertEquals(index, -1); From a960fb2aa09f5cbe0984b6e8b7543a2603ef9fa8 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 2 Mar 2023 16:53:48 -0600 Subject: [PATCH 4/5] fixed setting log level, should fix logging test not working --- .../github/openmaqs/utilities/logger/LoggingConfigUnitTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggingConfigUnitTest.java b/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggingConfigUnitTest.java index 2e8ec7b0..d4b94861 100644 --- a/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggingConfigUnitTest.java +++ b/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggingConfigUnitTest.java @@ -187,7 +187,7 @@ public void getLoggingLevelInvalidArgumentTest() { LoggingConfig.getLoggingLevelSetting(); newValueMap.clear(); - newValueMap.put("Log", "OnFail"); + newValueMap.put("LogLevel", "OnFail"); Config.addGeneralTestSettingValues(newValueMap, true); } From 793274087155c1b7d146db15ecacaceb429a0803 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Fri, 3 Mar 2023 10:41:02 -0600 Subject: [PATCH 5/5] fix flakey UIFindUnitTest.findElementWithText --- .../test/java/io/github/openmaqs/selenium/UIFindUnitTest.java | 4 ++-- .../openmaqs/utilities/logger/LoggerFactoryUnitTest.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java b/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java index f2ce9b35..4d6a0eb6 100644 --- a/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java +++ b/openmaqs-selenium/src/test/java/io/github/openmaqs/selenium/UIFindUnitTest.java @@ -113,8 +113,8 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { - String text = find.findElement(automationPageModel.automationShowDialog1).getText(); - Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), + String text = find.findElement(automationPageModel.automationPageHeader).getText(); + Assert.assertNotNull(find.findElementWithText(automationPageModel.automationPageHeader, text), "Element was not found"); } diff --git a/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggerFactoryUnitTest.java b/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggerFactoryUnitTest.java index 4c5836b5..859d0242 100644 --- a/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggerFactoryUnitTest.java +++ b/openmaqs-utilities/src/test/java/io/github/openmaqs/utilities/logger/LoggerFactoryUnitTest.java @@ -16,7 +16,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; - import org.testng.Assert; import org.testng.annotations.Test;