Skip to content

Commit

Permalink
Merge fixes from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Reiche committed Oct 14, 2021
1 parent af88d62 commit 1f7a95a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -40,19 +37,18 @@
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;

/**
* 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<WebTestPage> implements PageFactoryTest, AssertProvider {

@Override
public BasePage getPage() {
return PAGE_FACTORY.createPage(BasePage.class, WEB_DRIVER_MANAGER.getWebDriver());
public Class<WebTestPage> getPageClass() {
return WebTestPage.class;
}

// @Test()
Expand Down Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion integration-tests/src/test/resources/MethodParallel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<packages>
<package name="eu.tsystems.mms.tic.testframework.test.common"/>
<package name="eu.tsystems.mms.tic.testframework.test.events"/>
<package name="eu.tsystems.mms.tic.testframework.test.l10n"/>
<package name="eu.tsystems.mms.tic.testframework.test.reporting"/>
<package name="eu.tsystems.mms.tic.testframework.test.testdata"/>
<package name="eu.tsystems.mms.tic.testframework.test.utils"/>
Expand Down

0 comments on commit 1f7a95a

Please sign in to comment.