Skip to content

Conversation

Atelange
Copy link
Collaborator

This PR contain new test cases and stabilises a few existing test cases.

@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 07:35
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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;
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
import static Test.HeadlessBaseTest.driver;

Copilot uses AI. Check for mistakes.

package Pages;

import org.openqa.selenium.By;
import org.openqa.selenium.By;
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Duplicate import statement for org.openqa.selenium.By should be removed.

Suggested change
import org.openqa.selenium.By;

Copilot uses AI. Check for mistakes.

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");
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Method uses inputsearchbox2 but should use inputsearchbox3 based on the method parameter and variable declaration.

Suggested change
driver.findElement(inputsearchbox2).sendKeys("Cult Apex Massage Chair with Zero Gravity");
driver.findElement(inputsearchbox3).sendKeys("Cult Apex Massage Chair with Zero Gravity");

Copilot uses AI. Check for mistakes.

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