Skip to content

[Devin] Add test for catalog list view sorting functionality (DOT-TC-1290)#707

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1769359910-catalog-list-view-sorting-test
Open

[Devin] Add test for catalog list view sorting functionality (DOT-TC-1290)#707
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1769359910-catalog-list-view-sorting-test

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Implements automated test for DOT-TC-1290: "Verify the Sorting functionality of catalog list view is working properly"

Changes:

  • Added areFirstThreeItemCodesSortedDescending() method to CustomersPage.java and Customer.java to verify descending sort order (mirrors the existing ascending method)
  • Created new test class VerifyTheSortingFunctionalityOfCatalogListViewTest.java that:
    1. Logs into distributor portal
    2. Navigates to customer order guide → catalog → list view
    3. Clicks Item Code header and verifies ascending sort
    4. Clicks Item Code header again and verifies descending sort

Review & Testing Checklist for Human

  • Verify the test compiles - Local compilation failed due to Java 22 requirement; CI should verify this
  • Verify customer ID 16579 exists and has catalog items with numeric item codes for sorting verification
  • Run the test manually to confirm the sorting toggle behavior works as expected (ascending on first click, descending on second click)
  • Review the descending sort logic - The method assumes item codes are numeric integers (same as existing ascending method)

Recommended Test Plan

  1. Run the test against the UAT environment
  2. Verify the test passes and correctly identifies both ascending and descending sort states
  3. Optionally verify with a customer that has more than 3 catalog items to ensure sorting works beyond the first 3 items

Notes

  • Test follows the same pattern as existing catalog sorting tests (e.g., VerifyTheOnSaleSortItemsByItemCodeInCatalogTest)
  • The sorting verification checks only the first 3 items, consistent with existing areFirstThreeItemCodesSortedAscending() method

Link to Devin run: https://app.devin.ai/sessions/7b9c70ca6e4d4f168a104410fe44203f
Requested by: @sandaru-cd

- Add areFirstThreeItemCodesSortedDescending method to CustomersPage.java
- Add areFirstThreeItemCodesSortedDescending method to Customer.java
- Create VerifyTheSortingFunctionalityOfCatalogListViewTest.java test class

Co-Authored-By: sandaru@cutanddry.com <sandaru@cutanddry.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

1 participant