Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR contains new test cases and stabilizes existing test cases by adding three new test methods (unlockOffers, cartOffers, CheckoutLogin) and improving test reliability through enhanced wait strategies and better element handling.
- Adds new test cases for unlock offers, cart offers, and checkout login functionality
- Improves test stability by expanding try-catch blocks for Thread.sleep operations
- Updates test report to reflect successful runs of all test cases
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test-output/extentReport.html | Updated test report showing all 9 tests passing with new execution timestamps |
| src/test/java/Test/HeadlessBaseTest.java | New headless test class for running tests without UI |
| src/test/java/Test/BaseTest.java | Enhanced with new test methods and improved error handling |
| src/test/java/Pages/VerifyPDPComponents.java | Updated expected price value for popup verification |
| src/test/java/Pages/UnlockOffers.java | New page object for unlock offers functionality |
| src/test/java/Pages/SearchProduct.java | Cleaned up commented code |
| src/test/java/Pages/CheckoutLogin.java | New page object for checkout and login functionality |
| src/test/java/Pages/CartOffers.java | New page object for cart offers functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| import org.openqa.selenium.support.ui.ExpectedConditions; | ||
| import org.openqa.selenium.By; | ||
|
|
||
| import static Test.HeadlessBaseTest.driver; |
There was a problem hiding this comment.
This static import creates a potential conflict since BaseTest also declares its own static driver field. This could lead to unpredictable behavior when both classes are used together.
| import static Test.HeadlessBaseTest.driver; |
| package Pages; | ||
|
|
||
| import org.openqa.selenium.By; | ||
| import org.openqa.selenium.By; |
There was a problem hiding this comment.
Duplicate import statement for org.openqa.selenium.By should be removed.
| import org.openqa.selenium.By; |
| By inputsearchbox3 = By.xpath("(//input[@placeholder='Search for'])[1]"); | ||
|
|
||
| public void enterSearchText3(String text) { | ||
| driver.findElement(inputsearchbox2).sendKeys("Cult Apex Massage Chair with Zero Gravity"); |
There was a problem hiding this comment.
Method uses inputsearchbox2 but should use inputsearchbox3 based on the method parameter and variable declaration.
| driver.findElement(inputsearchbox2).sendKeys("Cult Apex Massage Chair with Zero Gravity"); | |
| driver.findElement(inputsearchbox3).sendKeys("Cult Apex Massage Chair with Zero Gravity"); |
This PR contain new test cases and stabilises a few existing test cases.