Content-Length: 269970 | pFad | http://github.com/Sefaria/Sefaria-Project/pull/2334

BD Contains a POC of the POM strategy for organizing e2e tests by b-w-cole · Pull Request #2334 · Sefaria/Sefaria-Project · GitHub
Skip to content

Contains a POC of the POM strategy for organizing e2e tests #2334

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

b-w-cole
Copy link
Contributor

banner.spec.ts and interface-language-is-stickey.spec.ts contain refactorizations of previous tests (and also keep the old ones).

Description

Page-Object-Models consist of each page as an object, centralized in a Page Manager, with tests containing abstractions of commands.

Code Changes

  • New Pages folder under e2e tests, containing some example pages as objects
    • Each page inherits the Helper Base class, containing common methods for each of the pages.
    • Each page has multilingual support
  • Page Manager to organize the pages, so we only need to call one object for all pages. Page Manager also toggles language changes for all pages.
  • Refactorization of Banner and Interface-Language-Is-Sticky tests
    • Old tests are still available in the files
  • Improvements/Refactors for utils.ts functions:
    • goToPageWithLang: Starting a test no longer spawns multiple tabs
    • changeLanguageOfText: Added to sourceTextPage.ts as a method, the only place where it will be used
    • loginUser: loginPage.ts might replace this
    • getPathAndParams: abstracted into HelperBase, as many pages will use it.

Notes

Architecture

Pages

  • Parent Class: HelperBase
  • Child Classes: Page classes
  • Separate Interface Navigation Class: banner.ts
  • Separate Page Manager class: PageManager.ts

Tests

  • Spec files

Page-Object-Models consist of each page as an object, centralized
in a Page Manager, with tests containing abstractions of commands.

banner.spec.ts and interface-language-is-stickey.spec.ts contain
refactorizations of previous tests (and also keep the old ones).
@coolify-sefaria
Copy link

coolify-sefaria bot commented Mar 5, 2025

The preview deployment is in progress. 🟡

Open Build Logs

Last updated at: 2025-03-05 05:45:31 CET

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.

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Sefaria/Sefaria-Project/pull/2334

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy