-
Notifications
You must be signed in to change notification settings - Fork 1
adjustments to highlight tests as per current deploy #2786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
omehes
wants to merge
6
commits into
main
Choose a base branch
from
newchanges
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ba70748
new changes as per deploy
omehes d136005
changes as per copilot
omehes 1f5db9a
Merge branch 'main' into newchanges
staxly[bot] 3da92ff
Merge branch 'main' into newchanges
staxly[bot] 47f759d
Merge branch 'main' into newchanges
staxly[bot] bcbe377
Merge branch 'main' into newchanges
staxly[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import pytest | ||
|
|
||
| from e2e_tests.e2e.ui.pages.home import HomeRex | ||
|
|
||
|
|
||
| @pytest.mark.asyncio | ||
| async def test_osweb_homepage_interested_link(chrome_page, base_url): | ||
|
|
||
| # GIVEN: Playwright, chromium and the rex_base_url | ||
|
|
||
| # WHEN: The Home page is fully loaded | ||
| await chrome_page.goto(base_url) | ||
| home = HomeRex(chrome_page) | ||
|
|
||
| # THEN: I'm interested page opens | ||
| await home.click_interested_link() | ||
|
|
||
| assert "interest" in chrome_page.url | ||
|
|
||
| await home.click_iam_dropdown_in_interested() | ||
|
|
||
| assert await home.iam_dropdown_list_item.is_visible() | ||
|
|
||
| await home.iam_dropdown_list_item.click() | ||
|
|
||
| assert await home.iam_form_page.is_visible() | ||
|
|
||
|
|
||
| @pytest.mark.asyncio | ||
| async def test_osweb_homepage_try_assignable_link(chrome_page, base_url): | ||
|
|
||
| # GIVEN: Playwright, chromium and the rex_base_url | ||
|
|
||
| # WHEN: The Home page is fully loaded | ||
| await chrome_page.goto(base_url) | ||
| home = HomeRex(chrome_page) | ||
|
|
||
| # THEN: Try OpenStax Assignable page opens | ||
| if "staging" in chrome_page.url: | ||
| await home.click_try_assignable_link() | ||
|
|
||
| assert "assignable" in chrome_page.url | ||
|
|
||
| else: | ||
| await home.click_try_assignable_link() | ||
|
|
||
| assert "assignable" in chrome_page.url | ||
|
|
||
| # THEN: Number of books available in assignables is 31 (as of Feb. 2026) | ||
| assert await home.available_book_list() >= 31 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,13 +25,12 @@ async def test_small_highlight_box_delete_note( | |||||
| await home.click_continue_login() | ||||||
|
|
||||||
| # THEN: Book page opens, highlight box appears, note is saved, then deleted and box disappears | ||||||
|
|
||||||
| await chrome_page.keyboard.press("Escape") | ||||||
|
|
||||||
| await home.double_click_text() | ||||||
|
|
||||||
| # NOTE!!! For now infobox needs to be clicked twice to have the edit highlight box open | ||||||
| await home.oneclick_highlight_infobox() | ||||||
| # THEN: Highlight infobox can be open by pressing Enter key only (as of Feb. 23, 2026) | ||||||
| await chrome_page.keyboard.press("Enter") | ||||||
|
|
||||||
| assert home.highlight_box_is_visible | ||||||
|
||||||
| assert home.highlight_box_is_visible | |
| assert await home.highlight_box_is_visible() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
if "staging" in chrome_page.urlblock duplicates the same click + URL assertion in both branches; only the book-count assertion is environment-specific. This can be simplified to always click/assert the URL, then conditionally assert the book list only when not staging to reduce duplication and future drift.