Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui-01] Work with Wheather ui branch #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

Kofanskih
Copy link
Owner

No description provided.

@DenisKozachok
Copy link

You are working with UI part but your PR name called "[ui-01] Work with Wheather api branch" it should be "[ui-01] Work with Wheather ui branch"

return this;
}

public HistoryPage checkHistoryPageElements(){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add parameter in method public HistoryPage checkHistoryPageElements(){

private final SelenideElement loginPage = $("[href=\"/login.aspx\"]");
public final String loginButton = "Login";

public MainPage open() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space

return new LoginPage();
}

public MainPage checkUserLogout(){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add parameter in method

return this;
}

public TomorrowPage checkTomorrowPageElements(){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add parametr

Comment on lines +13 to +19
private final String MAIN_PAGE = "https://www.weatherapi.com/weather/";
private final String USER_EMAIL = "[email protected]";
private final String USER_PASSWORD = "f2H*Jap*M6@7/d_";
private final String personalAccountText = "Welcome Back\n";
private final String WRONG_USER_EMAIL = "[email protected]";
private final String WRONG_USER_PASSWORD = "09876TYUI54321i";
private final String WARNING_MESSAGE= "Your login attempt was not successful. Please try again.";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move all this data in separate class and reuse in tests

Comment on lines +13 to +15
private final String USER_EMAIL = "[email protected]";
private final String USER_PASSWORD = "f2H*Jap*M6@7/d_";
private final String MAIN_PAGE = "https://www.weatherapi.com/";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move in separate class

import static com.codeborne.selenide.Selenide.open;

public class TodaysWeatherForecasTest {
private final String MAIN_PAGE = "https://www.weatherapi.com/weather/";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move in separate class

import static com.codeborne.selenide.Selenide.open;

public class TomorrowWeather {
private final String MAIN_PAGE = "https://www.weatherapi.com/weather/";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move in separate class

public class TomorrowWeather {
private final String MAIN_PAGE = "https://www.weatherapi.com/weather/";

@BeforeClass

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think about moving this configuration in separate class

@Kofanskih Kofanskih changed the title [ui-01] Work with Wheather api branch [ui-01] Work with Wheather ui branch Feb 25, 2025
Comment on lines +27 to +32
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.2</version>
<scope>test</scope>
</dependency>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have 2 testng dependencies

Comment on lines +34 to +51
<dependency>
<groupId>net.datafaker</groupId>
<artifactId>datafaker</artifactId>
<version>2.4.2</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.36</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.2</version>
<scope>compile</scope>
</dependency>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move in global pom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants