-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from Sprokof/add-ui-test-resetPassword
update Jdbc class and add successResetPassword test
- Loading branch information
Showing
5 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/test/java/com/digitalsanctuary/spring/user/ui/page/ForgotPasswordPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.digitalsanctuary.spring.user.ui.page; | ||
|
||
import com.codeborne.selenide.Selenide; | ||
import com.codeborne.selenide.SelenideElement; | ||
import com.digitalsanctuary.spring.user.ui.BaseUiTest; | ||
import org.openqa.selenium.By; | ||
|
||
import static com.codeborne.selenide.Selenide.$; | ||
import static com.codeborne.selenide.Selenide.$x; | ||
|
||
public class ForgotPasswordPage extends BaseUiTest { | ||
private final SelenideElement EMAIL_FIELD = $(By.id("email")); | ||
private final SelenideElement SUBMIT_BTN = $x("//button"); | ||
|
||
public ForgotPasswordPage(String url) { | ||
Selenide.open(url); | ||
} | ||
|
||
public ForgotPasswordPage fillEmail(String email) { | ||
EMAIL_FIELD.setValue(email); | ||
return this; | ||
} | ||
|
||
public SuccessResetPasswordPage clickSubmitBtn() { | ||
SUBMIT_BTN.click(); | ||
return new SuccessResetPasswordPage(); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/test/java/com/digitalsanctuary/spring/user/ui/page/SuccessResetPasswordPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.digitalsanctuary.spring.user.ui.page; | ||
|
||
import com.codeborne.selenide.Selenide; | ||
import com.codeborne.selenide.SelenideElement; | ||
import com.digitalsanctuary.spring.user.ui.BaseUiTest; | ||
|
||
public class SuccessResetPasswordPage extends BaseUiTest { | ||
private final SelenideElement SUCCESS_RESET_MESSAGE = Selenide.$x("//div[@class='container']//div[@class='container']//span"); | ||
|
||
public String message() { | ||
return SUCCESS_RESET_MESSAGE.text(); | ||
} | ||
} |