Skip to content
Snippets Groups Projects

Deploy

2 files
+ 27
2
Compare changes
  • Side-by-side
  • Inline

Files

@@ -35,9 +35,12 @@ public abstract class EndToEndTest {
protected BrowserContext context;
protected Page page;
protected String basePath;
public EndToEndTest() {
this.playwright = Playwright.create();
this.browser = playwright.webkit().launch();
this.basePath = "http://localhost:8081";
}
@BeforeEach
@@ -51,13 +54,17 @@ public abstract class EndToEndTest {
playwright.close();
}
protected String withPath(String path) {
return basePath + path;
}
/**
* Login to the application.
*
* @param user The username
*/
protected void login(String user) {
page.navigate("http://localhost:8081/login");
page.navigate(withPath("/login"));
page.getByLabel("Username").click();
page.getByLabel("Username").fill(user);
page.getByLabel("Username").press("Tab");
Loading