From 1f7a95ad387f013a4f5bbec77ff3688789321749 Mon Sep 17 00:00:00 2001 From: Mike Reiche Date: Thu, 14 Oct 2021 13:49:17 +0200 Subject: [PATCH] Merge fixes from master --- .../test/reporting/ScreenshotsTest.java | 14 +++++--------- .../src/test/resources/MethodParallel.xml | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/reporting/ScreenshotsTest.java b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/reporting/ScreenshotsTest.java index 3c1328464..1b90532c3 100644 --- a/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/reporting/ScreenshotsTest.java +++ b/integration-tests/src/test/java/eu/tsystems/mms/tic/testframework/test/reporting/ScreenshotsTest.java @@ -21,14 +21,11 @@ package eu.tsystems.mms.tic.testframework.test.reporting; -import eu.tsystems.mms.tic.testframework.AbstractTestSitesTest; +import eu.tsystems.mms.tic.testframework.AbstractExclusiveTestSitesTest; import eu.tsystems.mms.tic.testframework.annotations.Fails; import eu.tsystems.mms.tic.testframework.common.Testerra; -import eu.tsystems.mms.tic.testframework.core.pageobjects.testdata.BasePage; import eu.tsystems.mms.tic.testframework.core.pageobjects.testdata.WebTestPage; -import eu.tsystems.mms.tic.testframework.execution.testng.AssertCollector; import eu.tsystems.mms.tic.testframework.pageobjects.UiElement; -import eu.tsystems.mms.tic.testframework.report.Report; import eu.tsystems.mms.tic.testframework.report.model.context.MethodContext; import eu.tsystems.mms.tic.testframework.report.model.context.Screenshot; import eu.tsystems.mms.tic.testframework.report.utils.ExecutionContextController; @@ -40,7 +37,6 @@ import java.util.Optional; import org.openqa.selenium.By; import org.testng.Assert; -import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; import org.testng.reporters.Files; @@ -48,11 +44,11 @@ * Tests if screenshots are added to the MethodContext when a test fails. * @author Mike Reiche */ -public class ScreenshotsTest extends AbstractTestSitesTest implements PageFactoryTest, AssertProvider { +public class ScreenshotsTest extends AbstractExclusiveTestSitesTest implements PageFactoryTest, AssertProvider { @Override - public BasePage getPage() { - return PAGE_FACTORY.createPage(BasePage.class, WEB_DRIVER_MANAGER.getWebDriver()); + public Class getPageClass() { + return WebTestPage.class; } // @Test() @@ -117,7 +113,7 @@ public void test_Screenshot_is_present_in_MethodContext_on_collected_assertion() @Test public void test_DOMSource() throws IOException { - WebTestPage page = new WebTestPage(WebDriverManager.getWebDriver()); + WebTestPage page = getPage(); for (int s = 0; s < 3; ++s) { page.getOpenAgain().click(); diff --git a/integration-tests/src/test/resources/MethodParallel.xml b/integration-tests/src/test/resources/MethodParallel.xml index 647a38786..758b6cc24 100644 --- a/integration-tests/src/test/resources/MethodParallel.xml +++ b/integration-tests/src/test/resources/MethodParallel.xml @@ -5,7 +5,6 @@ -