[GSoC 2026] M 2.11 - Fix part of #24933: Acceptance tests for multi-entity translation - #2
Open
Rohan-Unbeg wants to merge 137 commits into
Open
Rohan-Unbeg wants to merge 137 commits into
Rohan-Unbeg wants to merge 137 commits into
Conversation
…ement translatable contents collection
…adata and title validation limits
…test coverage for metadata formatting logic
…k for the last state content card
…cycle in domain services
…ls after Save and close
…into gsoc-task-2.1
…-exploration entities
…cle and topic ID management
…tunity update lines
…n summary_services
… components (oppia#27174) * Fix part of oppia#27000: Add missing styleUrls to MultipleChoiceInput and ItemSelectionInput * Fix part of oppia#26889: Add missing styleUrls to 17 components * Fix part of oppia#26889: Add missing styleUrls to collection-player-page-root component
…uage … (oppia#27204) Fix oppia#27040: Use native language text and lang attribute for language menu aria-label Co-authored-by: NITISH KUMAR <imnitishkumar04@gmail.com>
…pia#27149) * Removed all references * Retaining check_tests_are_captured_in_ci.py * Removing unused references * Update yarn.lock * restoring protractor config file * fixing coverage * Revert "Resolving conflict" This reverts commit 082c95e, reversing changes made to 82789d8. * Revert "Revert "Resolving conflict"" This reverts commit 6de3f41.
…TML templates removing inconsistency of next 20 files (part-12) (oppia#27137) Fix part of oppia#25941: Clean up legacy embedded <style> tags from HTML templates (part-12)
… to the new Learner Dashboard and support viewing submitted suggestions, replies,status updates. (oppia#27152) * added backend api and upadted api responses according to the CUJs * fixed flakes * fixed flakes * added main files for the features * added top-navigation related logic * removed top-profile navigation logic as things are much complicated and we need proper implementation doc for it * fixed few review comments * removed conflicts * added unit tests andfixed flakes * added apis for notifications * added unit tests andfixed flakes * added html file for creator side * fixed mis-matching names * added more unit tests and fixed flakes * fixed a bug of showing notification on all three panels * added more unit tests and fixed flakes * fixed flakes * added i18n tags * added i18n tags * added i18n tags * added few fixes for updates when status is fixed * added validation and exception for invalid status * fixed resolve conflict * fixed resolve conflict * fixed failing frontend CI tests
* Upgrade @lhci/cli to 0.15.1 and lighthouse to 12.6.1 * Fix inject_entities_into_url to support URLs with multiple placeholders * Remove unused FirebaseAdmin initialization from lighthouse setup script * Fix LH tests * Consolidate Lighthouse CI into a single prod-mode run * Run Lighthouse CI for the desktop form factor * Install Node dependencies under the shared Node 20 runtime * Fix frontend tests and lint checks * Add Chrome stability flags for lighthouse CI * Relax lighthouse assertions to current per-page scores * Fix lighthouse CI: relax donate assertions, reduce shard size, fix offscreen-images override * Update lighthouse shard tests for 8 pages per shard * Close stale pages between Lighthouse runs to prevent Target.getTargetInfo errors * Relax accessibility thresholds to current per-page CI scores * Fix donate page crash and revert to 12 pages/shard Root cause: The puppeteer login script creates a new page via browser.newPage() for every URL but never closes it. After 12 URLs, 12 stale login pages accumulate with active CDP sessions. When Lighthouse connects and sets Target.setAutoAttach, it encounters stale targets from prior runs and fails with Target.getTargetInfo: Not allowed on the /donate page (and any subsequent page). Fix: Close the login page after seeding blank pages for Lighthouse. Login state (cookies) persists at the browser context level, not page level, so closing the page is safe. Also: - Revert LIGHTHOUSE_PAGES_PER_SHARD from 8 back to 12 - Revert stale page cleanup in seedBlankPagesForLighthouseRuns (was ineffective since it only closed Puppeteer-session pages, not Lighthouse child process pages) - Add accessibility thresholds for community-library (0.91), contact (0.95), contributor-dashboard (0.95), creator-dashboard (0.88) * Fix LH assertion values * Fix donate page CDP error and volunteer assertion * Patch Lighthouse target-manager to handle cross-origin CDP errors * Relax Lighthouse assertions for shard 1 * Relax Lighthouse accessibility assertions for shard 1 * Beautify Lighthouse CI logs with form factor headers * Separate desktop and mobile Lighthouse assertion matrices * Set ideal Lighthouse performance thresholds with per-form-factor values * Always print LHCI stderr so assertion results are visible * Add per-page error-level performance thresholds for shard 1 * Add per-page error-level performance thresholds for shard 2 * Add per-page error-level performance thresholds for shard 3 * Fix shard 1 mobile thresholds: add ~25% buffer for TBT and CLS\n\nMetrics fluctuate between CI runs. Per-page thresholds were set too\nclose to the worst observed values. New thresholds use ~25% buffer:\n- CLS: donate 0.1→1.0, contact 0.1→0.74, contributor-dashboard 0.1→0.15,\n get-started 0.1→0.65\n- LCP: about 37900→42000, creator-guidelines 34300→38500\n- TBT: donate 1650→3200, about 510→830, admin 720→1210, blog-dashboard\n 860→1390, community-library 870→1380, contact 590→975, contributor-\n dashboard 800→1290, creator-dashboard 950→1450, creator-guidelines\n 580→975, delete-account 750→1190, get-started 630→960 * Fix shard 2 mobile thresholds: add ~25% buffer for LCP and TBT\n\n- moderator: lcp 34500→38500, tbt 1240→1750\n- preferences: tbt 1360→1950\n- teach: tbt 870→1210\n- topics-and-skills-dashboard: lcp 36500→40500, tbt 1260→1730\n- thanks: tbt 710→920\n- volunteer: tbt 930→1170 * Bump admin and community-library LCP thresholds * Fix privacy-policy LCP, profile TBT, volunteer CLS * Promote catch-all to error level, fix desktop thresholds * Fix catch-all SI/LCP, contributor-dashboard SI, desktop teach * Fix linter errors and volunteer FCP/SI thresholds * Fix donate LCP and about FCP/SI thresholds * Scale all perf thresholds by 1.5x * Remove stale TODO comments from lighthouse configs * Fix review comments and consolidate accessibility mechanism * Fix story page desktop accessibility threshold * Fix story page desktop accessibility threshold * Filter warn-level Lighthouse results from CI * Add lighthouse env and patch tests * Harden lighthouse node patch and heap * Reuse playwright node for lighthouse install * Remove stray pylint directives from lighthouserc * Resolve duplicate patch tests * Fix lighthouse test patch * Fix lighthouse test expectations
…lModel records (oppia#27041) * Prevent failed emails from creating SentEmailModel records * Made suggested changes * Fixed Lint * Revert type hint to str
…able video upload
…TML templates removing inconsistency of next 20 files (part-11) (oppia#27120) Fix part of oppia#25941: Clean up legacy embedded <style> tags from HTML templates (part-11)
* Fix 16309 remove webpack infra * Enforce strict TypeScript checks and finalize test configurations * Updated comment in karma and combine tests * Fixed Frontend coverage test and update to code-coverage test command for Angular CLI * Fix oppia#15185: Add translation progress bar to review tab (oppia#26730) * Fix oppia#15185: Add translation progress bar to review tab Wires the existing progress-bar props from the translate tab (added in oppia#15182) into the reviewable translations opportunity list, so reviewers can see per-lesson translation status (cards accepted / in review / available) before opening a lesson to review. * Address review: keep review-tab button enabled when complete The Review Translations tab reuses the same opportunities-list-item progress bar as the Translate Text tab, which was disabling the opportunity button once translationsCount + inReviewCount reached totalCount. On the translate tab that's correct (nothing left to translate), but on the review tab it hid the ability to open a lesson that still has cards pending review. Add a disableButtonOnComplete input (default true, so the translate tab is unaffected) and set it to false for the review tab. * Retrigger CI after transient pip bootstrap failure The previous CI run failed across all jobs (Backend, Lint, Type, Frontend, Full-stack) at the same environment-setup step with: ImportError: cannot import name 'BuildDependencyInstallError' from 'pip._internal.exceptions'. This is a transient GitHub Actions runner/pip issue unrelated to this PR's changes (confirmed by a successful develop-branch Backend unit tests run at the same time). * Retrigger CI: re-run flaky acceptance test (unrelated to PR changes) --------- Co-authored-by: Rohan Unbeg <rohanunbeg0918@gmail.com> Co-authored-by: NITISH KUMAR <imnitishkumar04@gmail.com> * Fix oppia#24938: Migrate remaining userJourneys.js tests to acceptance (oppia#25268) * prettier fix * linter fix * lo.13 tests * lc.1 tests * IP1 remainder testing * error resolution * error fixing * as previous * debugging * error fixing for card selections * finalizing fixes for exploration * logged out learner tests * formatting fixes * formatting * minor fixes * reverting tsconfig issue * reverting tsconfig issue * reverting git ignore * test * fixing req file * . * fix * fix * fix * removing userjourneys.js * removing navigationPromise approach * fixing minor test failure * resolving error * fixing failing mobile test * linter fixes * linter fixes * linter fixes * verifying push * push test * resolving error * linter fix * time difference check * error resolution * fix * error fix * linter fix * error resolution * debugging * resolving dev mode failures * linter fixes * merge conflict res * reverting file * linter fix * merge conflict resolve * restoring root-files-config * adding missing file to rootfilesconfig to resolve ci error * fix * review fixes * resolving discrepencacies with sheet * error resolving * resolving errors after fixing discrepency * view collection error fix * learn about org fix * adding spreadsheet link, update year * mobile fix * same collection card for mobile error * view collection error fix selector * scroll fix * adjust footer wait * exploration creation mobile error fix (uncovering learner area bc of dropdown overlay * prev error fix * making constant for selectors * date update * date update * error fix overlay block * verifying fix * fixing links * link update * creating functions to ensure spec is high-level only * adding selector constants, removing unnecesarry waits * removing unnecesarry wait * added missing descs for card, removed unnecesarry selector * adding constant for selector * replacing unnecesarry tries w direct dom click * reduced role check time * removed unnecesarry wait * making view-a-collection spec high level, shifting funcs to loggedoutuser ts file * edit * making create basic exp higher level * removing duplicate selectors * fixing failing test (ts error, moving func) * small fix * error fix * test * test * linter fix * adding framework label * reverting change * removing unnecesarry change * as prev * creating func for lowlevel code * indent fix * lint fix * syntax error fix * minor fix * linter fix * matching spreadsheet * bold and italic text check * fixing accidental change * lint fix * removing unused files (ModeratorPage, PreferencePage) * fix * wait fix * test * fix * removing unused vars * test * fix * fix * fix * fix * fix * fix * fix test * removed comments * removed set viewport call and collection_name constant * new getTextContent func * reversing change * removing retry, using selector * fix test * linter fix * reverting change * linter fix * removing retry testing in super admin * as prev * as prev * test * reverting change * adding params * testing fix * testing func removal * removing unnecesarry func as suggested * view fix * edit * fix * test * revert failing fix * conditional fix * reverting fix * test * testing storage clear * small fix * fix test * fix test * revert * super admin removal * removing storage clear * removing unneeded role * skipping mobile test * linter fix * linter fix * linter fix * Removed unnecessary changes * Fixing lint * Resolved conflicts * Fixing failing tests --------- Co-authored-by: Mohak <143473709+Mohak51234@users.noreply.github.com> * Fix oppia#18670: Fix o.getOpportunitySubheading is not a function (oppia#26935) refactor opportunity iteration Co-authored-by: NITISH KUMAR <imnitishkumar04@gmail.com> * Remove unsafe type check and fix test infra * Revised memory size and reverted captureKilltime * Fixed backend failing error * Revert ck-editor and added comment * Fixed Frontend error * updated capturekilltime and fixed frontend coverage * Add ts-nocheck for spec.ts files * Fixed failing frontend and lint check * Reverted check_frontend_test_coverage to original * Fixed failing lint throw error * Fixed backend coverage * Fixed frontend test --------- Co-authored-by: Bhuvan Somisetty <somisettybhuvan5@gmail.com> Co-authored-by: Rohan Unbeg <rohanunbeg0918@gmail.com> Co-authored-by: NITISH KUMAR <imnitishkumar04@gmail.com> Co-authored-by: haani-maybe <171415359+haani-maybe@users.noreply.github.com> Co-authored-by: Mohak <143473709+Mohak51234@users.noreply.github.com> Co-authored-by: Sheron Jayasinghe <192441684+sheronjay@users.noreply.github.com>
* Fix added translation and question coordinators tabs * Added coverage for the contribution-admin-stats-table * removed unwanted file * Updated file location * Updated file location * Fixed the typeerror after changing the location of file
…TML templates removing inconsistency of next 30 files (part-13) (oppia#27163) * Fix part of oppia#25941: Clean up legacy embedded <style> tags from HTML templates removing inconsistency of next 30 files (part-13) * added skipped file * Fixed backend lint error * updated allowlist * restored correct html style allowlist * Fixed lint error
…hotToMatch (oppia#27209) * Updated the message * Update snapshot * Added link to wiki * Updating error message * Added custom reporter to prevent attachment logs * Updating msg * Correcting hyperlink and removing indentation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
specs/translation-submitter/feature-translation-opps-with-new-opps-model/translate-metadata-and-skill-in-target-language.spec.ts, covering the Content Type filter (its three options, and All, Lessons and Skills each filtering the list), its absence on the tabs that cannot use it, translating a lesson's title and objective including the 36 character title limit, translating a skill's description and explanation, and the resulting entries in "My Contributions".specs/translation-reviewer/feature-translation-opps-with-new-opps-model/review-metadata-and-skill-translations.spec.ts, covering the "Translations" action button on a review tab opportunity card, the Skills filter listing suggestions without an opportunity card to click through first, accepting and rejecting a skill translation and their toasts, opening a skill through its card from the mixed list, and reviewing a metadata translation.specs/logged-out-user/feature-translation-opps-with-new-opps-model/view-translated-lesson-metadata-and-concept-cards.spec.ts, covering the translated title and objective on a community library tile, the translated title in the lesson information card, the translated explanation on a concept card inside a lesson, and the fallback to English for a language with no accepted translation.CONTENT_TYPE_FILTERand the Content Type filter helpersselectContentTypeFilter,expectContentTypeFilterOptionsToBe,expectContentTypeFilterToBeVisibleandexpectSelectedContentTypeFilterToBetoutilities/user/contributor.ts, which is the shared home for dashboard helpers because the filter appears on both the "Translate Text" and "Review Translations" tabs.utilities/user/translation-submitter.tsfor the instruction line naming the content type, the source text, the validation errors, the save button state and its label, plusskipToTranslationItemOfContentTypeso a test can reach a named item without depending on the order the modal serves them in.utilities/user/translation-reviewer.tsfor an opportunity card's action button label, the "Back to lessons" control, submitting a review and checking its short-lived toast, and the accept and reject button labels.expectLessonTileToShowtoutilities/user/logged-out-user.ts, which checks the title and objective on a community library tile. The objective is only rendered at desktop width, so it is checked only there.core/tests/ci-test-suite-configs/acceptance.json.Note on scope
This PR is stacked on PRs 2.5 (oppia#26997), 2.7 (oppia#26961) and 2.8 (oppia#27083) and must merge after all three. The milestone table lists only 2.7 and 2.8 as prerequisites, but the Content Type filter and the metadata and skill items in the translation modal come from 2.5, so the contributor flows cannot be tested without it. Those three branches are merged into this one, so the GitHub diff shows their files too. The files this PR itself adds are the ones listed above, and the incremental diff is
git diff --name-only $(git rev-list --min-parents=2 --max-count=1 HEAD) HEAD.The specs are written for Puppeteer rather than Playwright. The Playwright migration (oppia#24715) is proceeding one user journey at a time and has not reached translation-submitter or translation-reviewer, and the Playwright suite has no contributor dashboard utilities at all. Writing these in Playwright would mean building a translation submitter, a translation reviewer, the opportunity filters and the translation and review modals from scratch, duplicating work that migration will do, and splitting one feature's coverage across two frameworks. It would also leave 2.13 unable to fold the
feature-folders back into the base Puppeteer specs when the feature flag is removed.Search by translated title and tag (2.9, oppia#27111) is not covered here. It was added to the plan after the milestone table was written and is not part of 2.11's scope, and including it would add a fourth unmerged branch to the stack.
Essential Checklist
Please follow the instructions for making a code change.
Testing doc (for PRs with Beam jobs that modify production server data)
N/A
Proof that changes are correct
Proof of changes on desktop with slow/throttled network
This PR adds acceptance tests and changes no user-facing behaviour, so the proof is the test runs themselves.
Verification via static checks:
npx tsc --noEmit -p tsconfig.puppeteer-acceptance-tests.jsonpasses with no errors in the changed files.npx eslint --ext .tspasses on the three new specs and the four changed utility files.npx prettier --checkpasses oncore/tests/puppeteer-acceptance-tests/andcore/tests/ci-test-suite-configs/acceptance.json.python -m scripts.check_tests_are_captured_in_ciconfirms the three new suites are registered.Verification via stress tests:
Stress tested each new suite for 50 runs across both viewports:
translation-submitter/feature-translation-opps-with-new-opps-model/translate-metadata-and-skill-in-target-language: TODO runs passed (TODO link)translation-reviewer/feature-translation-opps-with-new-opps-model/review-metadata-and-skill-translations: TODO runs passed (TODO link)logged-out-user/feature-translation-opps-with-new-opps-model/view-translated-lesson-metadata-and-concept-cards: TODO runs passed (TODO link)Proof of changes on mobile phone
The stress test workflow runs every suite at both desktop and mobile viewport, so the mobile results are in the runs linked above.
Proof of changes in Arabic language
view-translated-lesson-metadata-and-concept-cards.spec.tssets the site language to Arabic to check that a concept card with no accepted Arabic translation falls back to its English explanation.PR Pointers