Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a new audiobook test and reorganizes existing tests to better reflect their purpose and scope. The changes include creating a dedicated test file for accessibility help in the UI tests, moving tests to more appropriate test files, and adding support methods to the page object class for audiobook functionality testing.
Changes:
- Creates a new test file
test_accessibility_help.pyfor UI accessibility testing - Moves
test_book_title_links_to_books_detail_pagefromtest_details_page.pytotest_subjects_books_pages.py(more appropriate location) - Moves
test_accessibility_helpfromtest_details_page.pyto the new dedicated UI test file - Adds new audiobook link test to
test_details_page.pywith supporting methods in the page object
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| e2e_tests/e2e/ui/test_accessibility_help.py | New test file for accessibility help functionality testing |
| e2e_tests/e2e/ui/pages/home.py | Added audiobook-related methods: audiobook_link_is_visible() and audiobook_link_purchase_options property |
| e2e_tests/e2e/osweb/test_details_page.py | Removed test_book_title_links_to_books_detail_page and test_accessibility_help; added test_audiobook_link |
| e2e_tests/e2e/osweb/test_subjects_books_pages.py | Added test_book_title_links_to_books_detail_page (moved from test_details_page.py) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if not diffs: | ||
| print("------>>>>> NO DIFFERENCES <<<<<------") | ||
| else: | ||
| print_diffs(diffs) |
There was a problem hiding this comment.
The test function is missing an assertion or failure case. When differences are found in the docx files, the test should fail rather than just printing the diffs. The test currently prints the diffs and exits successfully even if there are differences, which defeats the purpose of a test.
| print_diffs(diffs) | |
| print_diffs(diffs) | |
| pytest.fail("Differences found between DOCX/ZIP contents. See printed diffs above.") |
TomWoodward
left a comment
There was a problem hiding this comment.
the audiobook thing is fine, i think the other stuff you changed i've commented on in other prs (i'm not sure the docx tests are worth it)
https://openstax.atlassian.net/browse/CORE-988