Skip to content
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

NO-OPIK fix locator for next page buttons #1085

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

AndreiCautisanu
Copy link
Contributor

Details

Traces tests got broken because adding a 4th tab above the tables interfered with the locator for the next page button that was being used. Changed the locator everywhere to cover this and any possible future changes.

@AndreiCautisanu AndreiCautisanu requested review from a team as code owners January 20, 2025 14:57
Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

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

Just a small suggestion. Ignore if not possible.

Comment on lines +11 to +16
self.next_page_button_locator = (
self.page.locator("div")
.filter(has_text=re.compile(r"^Showing (\d+)-(\d+) of (\d+)"))
.nth(2)
.locator("button:nth-of-type(3)")
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: code is repeated multiple times, feel free to centralise it in some way, to avoid copying & pasting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will spend some time doing some general code cleanup in the near future and will try to centralize most repeating methods/locators between pages into a single parent class that they can all inherit

@AndreiCautisanu AndreiCautisanu merged commit 7c5b9c0 into main Jan 21, 2025
2 checks passed
@AndreiCautisanu AndreiCautisanu deleted the andrei/automation-fixes-jan20 branch January 21, 2025 09:16
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.

2 participants