Skip to content

adds new test for he/bookstore page#2843

Merged
omehes merged 51 commits intomainfrom
booksto
Apr 13, 2026
Merged

adds new test for he/bookstore page#2843
omehes merged 51 commits intomainfrom
booksto

Conversation

@omehes
Copy link
Copy Markdown
Contributor

@omehes omehes commented Apr 3, 2026

@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 3, 2026 15:55 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 3, 2026 16:52 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 3, 2026 18:41 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 3, 2026 20:59 Inactive
@omehes omehes marked this pull request as ready for review April 6, 2026 21:06
@omehes omehes requested a review from a team as a code owner April 6, 2026 21:06
@omehes omehes requested a review from TomWoodward April 6, 2026 21:06
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 6, 2026 21:06 Inactive
@omehes omehes requested a review from Copilot April 6, 2026 21:16
Copy link
Copy Markdown
Contributor

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 adds a new test suite for the Higher Education and bookstore pages in the OpenStax web application. The changes introduce new page object methods to support testing the HE and bookstore page functionality, along with two comprehensive test cases that verify critical bookstore features work across both staging and production environments.

Changes:

  • Added 12 new page object properties and 2 new async methods to the HomeRex class for interacting with HE and bookstore page elements
  • Added test file test_osweb_higher_education_page.py with two test functions: one for the HE page and one for the bookstore page
  • Tests validate page navigation, element visibility, and form functionality including multi-tab form submission

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
e2e_tests/e2e/ui/pages/home.py Added page object methods and properties for Higher Education and bookstore page interactions
e2e_tests/e2e/osweb/test_osweb_higher_education_page.py New test file with two test functions validating HE page and bookstore functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +48 to +55
# THEN: Bookstore page elements are visible/enabled in both staging and prod envs
assert await home.higher_education_bookstore_order_access_code.is_enabled()
assert await home.higher_education_bookstore_view_print_options.first.is_enabled()
assert await home.obtain_access_codes_via_vitalsource.is_visible()
assert await home.obtain_access_codes_via_openstax.is_visible()
assert await home.know_before_your_order_columns.is_visible()
assert await home.higher_education_bookstore_view_print_options.last.is_enabled()
assert await home.access_pdf.is_enabled()
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

Link elements (HTML <a> tags) do not have an "enabled" state. The .is_enabled() method is designed for form controls like buttons and inputs. For links, use .is_visible() or .is_clickable() instead. This applies to lines 49, 50, 55, and 54 which all call .is_enabled() on link elements.

Suggested change
# THEN: Bookstore page elements are visible/enabled in both staging and prod envs
assert await home.higher_education_bookstore_order_access_code.is_enabled()
assert await home.higher_education_bookstore_view_print_options.first.is_enabled()
assert await home.obtain_access_codes_via_vitalsource.is_visible()
assert await home.obtain_access_codes_via_openstax.is_visible()
assert await home.know_before_your_order_columns.is_visible()
assert await home.higher_education_bookstore_view_print_options.last.is_enabled()
assert await home.access_pdf.is_enabled()
# THEN: Bookstore page elements are visible in both staging and prod envs
assert await home.higher_education_bookstore_order_access_code.is_visible()
assert await home.higher_education_bookstore_view_print_options.first.is_visible()
assert await home.obtain_access_codes_via_vitalsource.is_visible()
assert await home.obtain_access_codes_via_openstax.is_visible()
assert await home.know_before_your_order_columns.is_visible()
assert await home.higher_education_bookstore_view_print_options.last.is_visible()
assert await home.access_pdf.is_visible()

Copilot uses AI. Check for mistakes.
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 6, 2026 21:30 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 8, 2026 17:14 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 8, 2026 22:58 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 17:58 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 17:59 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 17:59 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 17:59 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 18:48 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 18:49 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 18:55 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 18:56 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:04 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:05 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:13 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:13 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:14 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:14 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 9, 2026 19:14 Inactive
@TomWoodward TomWoodward temporarily deployed to rex-web-booksto-bjgum4ler0wezk April 10, 2026 10:44 Inactive
Copy link
Copy Markdown
Member

@TomWoodward TomWoodward left a comment

Choose a reason for hiding this comment

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

this is ok to merge, but you should consider:

you're putting osweb tests in the rex repo. the rex repo only serves the reading pages, so they're a little out of place here. i understand that its probably easier to have just the one test suite for all the automated tests, but its still a little weird

this page is manged by the CMS, and all the assertions that you have are likely to become broken as the team optimizes the content of the page to communicate what it needs to communicate. these style of tests for CMS pages are going to be very brittle and need frequent updating

@omehes omehes merged commit 4eb6545 into main Apr 13, 2026
7 checks passed
@omehes omehes deleted the booksto branch April 13, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants