Skip to content

Anca/Bookmarks refactoring - star icon and hamburger menu (first part) #559

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

Merged
merged 7 commits into from
Apr 24, 2025

Conversation

soncuteanca
Copy link
Collaborator

@soncuteanca soncuteanca commented Apr 24, 2025

Relevant Links

Bugzilla: 1953254
TestRail: S2525

Description of Code / Doc Changes

  1. General Improvements:
  • Instance Attributes
  • Method and Test Naming
  • Context Managers with Decorators
  • Docstrings
  • Private Methods
  • Type Annotations
  • General Code Cleanup
  1. Page Object Model (POM) / Browser Object Model (BOM) Improvements:
  • Default Chrome Context
  • Constructor Initialization
  1. Test Improvements:
  • Modularize Longer Tests
  • Explicit Waits in POM/BOM
  • Context Manager Switching

Mark the relevant boxes:

  • Adds a dependency (rerun pipenv install)
  • Changes the BasePage
  • Changes or creates a BOM/POM (name the object model): _
  • Changes CI flow
  • Changes scheduled Beta or DevEdition
  • Changes Git hooks or Github settings
  • Changes L10n harness

Comments or Future Work

  • Tests completed for now on this test suite: test_bookmark_via_bookmark_menu and test_bookmark_website_via_star_button. The rest of the tests that are modified are due to the changes in BOM.
  • I will continue with the second part for star icon and hamburger menu for bookmarks, then switch to bookmarks from toolbar and then to history tests.
  • I've grouped all the methods that initialize the bookmark action from Hamburger Menu together, but note that bookmark_current_tab_via_hamburger_menu method use two selectors located in two different jsons (moving one or another in a single json i don't think is ideal here if i want to stick with keeping methods together), therefore I've instantiated a constructor in browser_object_panel_ui to adjust this.
  • I'll group the methods in POMs/BOMs based on sections, for now I just moved the the bookmarks methods at the bottom of the page and for these made updates only on the targeted methods for the tests covered for refactoring in this PR.
  • I've talked about creating subfolders, but I will do that once all the tests are refactored.

Workflow Checklist

  • Please request reviewers
  • If this is an unblocker, please post in Slack.
  • If asked to address comments, please resolve conversations.
  • If asked to change code, please re-request review from the person who wanted changes.

Thank you!

Copy link
Collaborator

@Tracy-Walker Tracy-Walker left a comment

Choose a reason for hiding this comment

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

Thumbs up!

@Tracy-Walker Tracy-Walker merged commit 1971f95 into main Apr 24, 2025
6 checks passed
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