Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3624cdd
adds new test for he/bookstore page
omehes Apr 3, 2026
3bf266a
adds new test for he/bookstore page2
omehes Apr 3, 2026
8dc70dd
adds new test for he/bookstore page3
omehes Apr 3, 2026
dd1cd07
updates and corrections
omehes Apr 6, 2026
8c6cb80
small copilot addjustment
omehes Apr 6, 2026
b70a067
Merge branch 'main' into booksto
staxly[bot] Apr 8, 2026
853ec93
Merge branch 'main' into booksto
staxly[bot] Apr 8, 2026
85e0fb9
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
f415d88
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
0a62104
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
19a2b79
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
a2d148f
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
e1c2f90
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
4c70648
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
1ea6266
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
cf17f0d
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
2d4fec0
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
1e2f989
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
7c7c32c
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
bd2a406
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
794d65e
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
49c2104
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
8e80298
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
1f2dfb7
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
a5c966d
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
44ff621
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
42d9640
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
544fd86
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
687a710
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
5ee5d3f
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
eaffa50
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
6ee1be6
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
db66f9c
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
ed5f4b7
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
41b406a
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
872236f
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
e4fb920
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
78bf8e5
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
048181c
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
ad5f550
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
6bd931d
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
ec283e5
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
327b614
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
5d7df63
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
cf661e9
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
4e3c3c0
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
5b44989
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
21cf3c2
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
4333489
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
bd0ff0a
Merge branch 'main' into booksto
staxly[bot] Apr 9, 2026
40c4e13
Merge branch 'main' into booksto
staxly[bot] Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions e2e_tests/e2e/osweb/test_osweb_higher_education_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import pytest
from e2e_tests.e2e.ui.pages.home import HomeRex


@pytest.mark.asyncio
async def test_osweb_higher_education_page(chrome_page, base_url):

# GIVEN: Playwright, chromium and the rex_base_url
await chrome_page.goto(base_url)
home = HomeRex(chrome_page)
await chrome_page.keyboard.press("Escape")

# WHEN: Navigate to Higher Education (HE) page (depends on envs)
if "staging" in chrome_page.url:
pytest.skip("Skipping test. Staging is missing Higher Education page")
else:

await home.click_higher_education_link()

# THEN: HE page opens
assert await home.try_assignable_today_link.is_visible()

assert await home.free_digital_library_subjects.count() == 8

assert await home.search_technology_partners_link.is_visible()

assert (
"affordable technology for higher education"
in await chrome_page.inner_text("body")
)


@pytest.mark.asyncio
async def test_osweb_higher_education_page_bookstore_link(chrome_page, base_url):

# GIVEN: Playwright, chromium and the rex_base_url
await chrome_page.goto(base_url)
home = HomeRex(chrome_page)
await chrome_page.keyboard.press("Escape")

# WHEN: Navigate to bookstore page (depends on envs)
if "staging" in chrome_page.url:
await chrome_page.goto(f"{base_url}/bookstore")
else:
await home.click_higher_education_link()
await home.click_campus_affordability_link()

# THEN: Bookstore page elements are visible/enabled 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()

# THEN: Access code order form opens in new tab
async with chrome_page.expect_popup() as popup_info:
await home.access_code_order_form.click()

new_tab = await popup_info.value
await new_tab.wait_for_load_state()

assert "riceuniversity.tfaforms.net/47" in new_tab.url
assert "Assignable Bookstore Order Form" in await new_tab.title()

await new_tab.close()
54 changes: 54 additions & 0 deletions e2e_tests/e2e/ui/pages/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,60 @@ async def click_search_result(self):
async def section_count(self):
return await self.page.locator("section").all()

# Higher Education and bookstore page

@pytest.mark.asyncio
async def click_higher_education_link(self):
await self.page.get_by_role("link", name="Explore Higher Ed resources").click()

@pytest.mark.asyncio
async def click_campus_affordability_link(self):
await self.page.get_by_role("link", name="Explore your options!").click()

@property
def higher_education_bookstore_order_access_code(self):
return self.page.get_by_role("link", name="Order access codes")

@property
def higher_education_bookstore_view_print_options(self):
return self.page.get_by_role("link", name="View print options")

@property
def obtain_access_codes_via_vitalsource(self):
return self.page.get_by_role(
"heading", name="Order through VitalSource-powered programs"
)

@property
def obtain_access_codes_via_openstax(self):
return self.page.get_by_role("heading", name="Order directly through OpenStax")

@property
def know_before_your_order_columns(self):
return self.page.locator(
"div.content-block-cards.card_style_rounded.has-columns"
)

@property
def access_pdf(self):
return self.page.get_by_role("link", name="Access PDF")

@property
def access_code_order_form(self):
return self.page.get_by_role("link", name="order form")

@property
def try_assignable_today_link(self):
return self.page.get_by_role("link", name="Try Assignable today!")

@property
def free_digital_library_subjects(self):
return self.page.locator("div.content-block-cards a.cta-link")

@property
def search_technology_partners_link(self):
return self.page.get_by_role("link", name="Search Technology Partners")

# Clears blockers/overlays

@pytest.mark.asyncio
Expand Down
Loading