Page MenuHomePhabricator

[MEX][QC] Introduce Cypress end-to-end tests to WikibaseQualityConstraints
Closed, ResolvedPublic

Description

WikibaseQualityConstraints currently contains PHPUnit and Jasmine test suites, but no end-to-end tests. Install and configure Cypress, and write a simple test (or multiple tests) of the existing QualityConstraints functionality as it appears in the desktop user interface.

The goal here is that when we implement the QualityConstraints functionality for MEX, we are then able to cover it with end-to-end tests without introducing a dependency on QualityConstraints to Wikibase.

Given the difficulties of fully setting up the extension in CI (importing constraint entities etc.), the Cypress tests might end up stubbing out the API calls (i.e. we’re only testing the frontend, but we are at least testing the integration of WBQC with Wikibase).

Acceptance Criteria

  • Cypress tests covering the display of QualityConstraint icons / warnings exist and run in CI

Event Timeline

ArthurTaylor renamed this task from [MEX] Introduce Cypress end-to-end tests to WikibaseQualityConstraints to [MEX][QC] Introduce Cypress end-to-end tests to WikibaseQualityConstraints.Dec 4 2025, 7:21 AM

Change #1215129 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/WikibaseQualityConstraints@master] Introduce Cypress tests to WikibaseQualityConstraints

https://gerrit.wikimedia.org/r/1215129

Change #1215204 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseQualityConstraints@master] WIP: Test constraint checks

https://gerrit.wikimedia.org/r/1215204

Change #1216579 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/WikibaseQualityConstraints@master] [WIP] Failing Cypress test for MEX / wbui2025 quality constraints

https://gerrit.wikimedia.org/r/1216579

Change #1215129 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Introduce Cypress tests to WikibaseQualityConstraints

https://gerrit.wikimedia.org/r/1215129

Change #1215204 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Basic tests of QualityConstraints UI on Desktop

https://gerrit.wikimedia.org/r/1215204

I think we can move this into verification, and the remaining attached change belongs to another task?

yep - that's my expectation. I'll move the patch to the other task as soon as we work out which one it should be. Thanks!

@ArthurTaylor It looks good to me, just missing the update for the extension README.md file regarding the new Cypress support and it will be good to go.

Change #1218216 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/WikibaseQualityConstraints@master] Update README to describe use of Cypress

https://gerrit.wikimedia.org/r/1218216

@mahmoud.abdelsattar.wmde Thanks! I added an additional patch with a README file for your review.

Change #1218216 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Update README to describe use of Cypress

https://gerrit.wikimedia.org/r/1218216