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

18 translation version name in title bar #1979

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

Conversation

b-w-cole
Copy link

Description

A test to cover this test case: Sefaria/Sefaria-Playwright-Tests#18

Includes:

  • Parameterized tests for all Interface and Source language combinations
  • Abstracted source language function for this and future purposes
  • New Global variable for source language selection, pointing to DOM locators.

Code Changes

The following changes were made to the files below

Notes

Issue noted with Hebrew sources - the translation title doesn't appear by default. Such cases are commented out in the test parameters.

@b-w-cole
Copy link
Author

@saengel , this one isn't quite ready to merge. I'm wondering about your opinion on the file translation-version-name-appears-in-title.spec.ts, and the commented out tests. Do you want me to test for the existence of a default translation title? This will fail for Hebrew source language texts, as the default translation isn't selected in the translation side bar.

@saengel
Copy link
Contributor

saengel commented Aug 1, 2024

@saengel , this one isn't quite ready to merge. I'm wondering about your opinion on the file translation-version-name-appears-in-title.spec.ts, and the commented out tests. Do you want me to test for the existence of a default translation title? This will fail for Hebrew source language texts, as the default translation isn't selected in the translation side bar.

Hi @b-w-cole - thank you again! Another fantastic PR - much appreciated!

I think for Hebrew source language texts, let's keep them commented out for now. Let me know when it's ready for a review.

@b-w-cole
Copy link
Author

b-w-cole commented Aug 9, 2024

Hi @saengel ! Sorry for the long wait. I tweaked the Hebrew source language tests to be their own separate test, as the logic needs to be slightly different.

However, I noticed a quirk with the Hebrew Interface / Hebrew Source translations.

  1. Load Hebrew Interface and Source text
  2. Navigate to Translations
  3. Select 'חומש רש״י, רבי שרגא זילברשטיין'
  4. 'The Rashi chumash by Rabbi Shraga Silverstein' (in English) will appear in the translation title.

I would expect the Hebrew translation title to appear in the translation title.
image

Also the source text switches itself to Bilingual.
image

I will switch this test parameter to Shocken's translation for now and recommit.

Also allowing default translation validations to be skipped for
Hebrew language source texts
@b-w-cole
Copy link
Author

b-w-cole commented Aug 9, 2024

Hi @saengel , I was able to consolidate the English and Hebrew tests with a little rearranging. Additionally, I added bilingual support.

b-w-cole and others added 2 commits August 9, 2024 17:06
Issue: Tests time out on assertions looking for text in the wrong
language

Solution: Clearing the cookies resets the cookie-setting process and allows
language cookies to be refreshed for each context.
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