-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored Juice Shop tests, reformatted all page object and test cla…
…sses (#124) * added new class with refactored kjuice shop tests * formatting changes for src/main folder files * formatting changes and refactoring done for page object classes * formatting changes and refactoring done for tests, removed warnings and redundant code * test order changed for form authentication tests * test order changed for form authentication tests in selenium grid testng xml * fixed code smell in the utility helper class
- Loading branch information
1 parent
2591292
commit 1b5b8e8
Showing
86 changed files
with
574 additions
and
393 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
20 changes: 20 additions & 0 deletions
20
src/test/java/io/github/mfaisalkhatri/data/juiceshop/UserData.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,20 @@ | ||
package io.github.mfaisalkhatri.data.juiceshop; | ||
|
||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Builder | ||
@Getter | ||
public final class UserData { | ||
|
||
private String name; | ||
private String email; | ||
private String pass; | ||
private int mobileNumber; | ||
private String address; | ||
private String city; | ||
private String state; | ||
private String zipcode; | ||
private String country; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/io/github/mfaisalkhatri/data/juiceshop/UserDataBuilder.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,21 @@ | ||
package io.github.mfaisalkhatri.data.juiceshop; | ||
|
||
import net.datafaker.Faker; | ||
|
||
public final class UserDataBuilder { | ||
|
||
public static UserData getUserData() { | ||
|
||
final Faker faker = new Faker(); | ||
return UserData.builder().name(faker.name() | ||
.fullName()).email(faker.internet() | ||
.emailAddress()).pass(faker.internet() | ||
.password(6, 12)).mobileNumber(faker.number() | ||
.numberBetween(99900000, 99988888)).address(faker.address() | ||
.streetAddress()).city(faker.address() | ||
.city()).state(faker.address() | ||
.state()).zipcode(faker.number() | ||
.digits(6)).country(faker.address() | ||
.country()).build(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ithub/mfaisalkhatri/data/BillingData.java → ...data/lambdatestecommerce/BillingData.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
2 changes: 1 addition & 1 deletion
2
.../mfaisalkhatri/data/RegisterUserData.java → ...lambdatestecommerce/RegisterUserData.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
4 changes: 2 additions & 2 deletions
4
...b/mfaisalkhatri/data/TestDataBuilder.java → .../lambdatestecommerce/TestDataBuilder.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
6 changes: 3 additions & 3 deletions
6
src/test/java/io/github/mfaisalkhatri/listeners/RetryListener.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
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
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
4 changes: 2 additions & 2 deletions
4
src/test/java/io/github/mfaisalkhatri/pages/geolocation/MyLocationPage.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
4 changes: 2 additions & 2 deletions
4
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/AddressPage.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
10 changes: 5 additions & 5 deletions
10
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/CheckoutPage.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
8 changes: 4 additions & 4 deletions
8
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/DeliverySelection.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
6 changes: 3 additions & 3 deletions
6
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/LoginPage.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
8 changes: 4 additions & 4 deletions
8
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/MainPage.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
4 changes: 2 additions & 2 deletions
4
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/OrderConfirmationPage.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
8 changes: 4 additions & 4 deletions
8
src/test/java/io/github/mfaisalkhatri/pages/juiceshop/OrderSummaryPage.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
Oops, something went wrong.