Skip to content

Commit e7b5ab8

Browse files
committed
misc updates
1 parent 4c73607 commit e7b5ab8

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

src/main/java/io/github/tahanima/page/login/LoginPage.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@
1212
*/
1313
public class LoginPage extends BasePage {
1414

15-
@Step
15+
@Step("Navigate to the login page")
1616
public LoginPage navigateToUrl() {
1717
page.navigate(config().baseUrl());
1818

1919
return this;
2020
}
2121

22-
@Step
22+
@Step("Fill <username> in 'Username' textbox")
2323
public LoginPage fillUsernameInTextBox(String username) {
2424
page.fill("id=user-name", username);
2525

2626
return this;
2727
}
2828

29-
@Step
29+
@Step("Fill <password> in 'Password' textbox")
3030
public LoginPage fillPasswordInTextBox(String password) {
3131
page.fill("id=password", password);
3232

3333
return this;
3434
}
3535

36-
@Step
36+
@Step("Get error message")
3737
public Locator getErrorMessage() {
3838
return page.locator(".error-message-container h3");
3939
}
4040

41-
@Step
41+
@Step("Click on the 'Login' button")
4242
public void clickOnLoginButton() {
4343
page.click("id=login-button");
4444
}

src/main/java/io/github/tahanima/page/product/ProductsPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
public class ProductsPage extends BasePage {
1212

13-
@Step
13+
@Step("Get title of the 'Products' page")
1414
public Locator getTitle() {
1515
return page.locator(".title");
1616
}

src/test/java/io/github/tahanima/e2e/BaseE2ETest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
import io.github.tahanima.util.BrowserManager;
1818

1919
import org.apache.commons.lang3.StringUtils;
20-
import org.junit.jupiter.api.AfterAll;
21-
import org.junit.jupiter.api.BeforeAll;
22-
import org.junit.jupiter.api.TestInstance;
20+
import org.junit.jupiter.api.*;
2321
import org.junit.jupiter.api.extension.AfterTestExecutionCallback;
2422
import org.junit.jupiter.api.extension.RegisterExtension;
2523

@@ -53,7 +51,7 @@ protected <T extends BasePage> T createInstance(Class<T> basePage) {
5351
}
5452

5553
@BeforeAll
56-
public void setup() {
54+
public void createPlaywrightAndBrowserInstancesAndSetupAllureEnvironment() {
5755
playwright = Playwright.create();
5856
browser = BrowserManager.browser(playwright);
5957

@@ -68,7 +66,7 @@ public void setup() {
6866
}
6967

7068
@AfterAll
71-
public void teardown() {
69+
public void closeBrowserAndPlaywrightSessions() {
7270
browser.close();
7371
playwright.close();
7472
}

src/test/java/io/github/tahanima/e2e/login/LoginE2ETest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LoginE2ETest extends BaseE2ETest {
2121
private LoginPage loginPage;
2222

2323
@BeforeEach
24-
public void initialize() {
24+
public void createBrowserContextAndPageAndLoginPageInstances() {
2525
browserContext = browser.newContext();
2626
page = browserContext.newPage();
2727

@@ -34,7 +34,7 @@ protected byte[] captureScreenshotOnFailure() {
3434
}
3535

3636
@AfterEach
37-
public void closeBrowserContext() {
37+
public void closeBrowserContextSession() {
3838
browserContext.close();
3939
}
4040

0 commit comments

Comments
 (0)