stable
Clone or download
Read-only
closes request #22679 Improve cypress tests
How to test: make test_cypress should end without error Having test written with `cy.contains(...).click` is a bad practise: if any other string matches the query we can't be sure of the DOM element we'll find We must privilege `data-test` attribute whenever we can, please note that cy.get("[data-test=...]").within(() => { cy.contains('...').click() }) is a valid alternative as we limit the scope of our string chain inside DOM element Change-Id: Iccb87e41a2778f943666240dbc7d3810c8da7b84
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/view/Docman_View_Docman.class.php | +2 | −1 | Go to diff View file |
M | plugins/docman/tests/e2e/cypress/cypress/integration/docman.spec.ts | +1 | −1 | Go to diff View file |
M | plugins/mediawiki/tests/e2e/cypress/cypress/integration/platform_allows_anonymous.spec.ts | +1 | −1 | Go to diff View file |
M | plugins/mediawiki/tests/e2e/cypress/cypress/integration/platform_allows_restricted.spec.ts | +2 | −2 | Go to diff View file |
M | plugins/mediawiki/tests/e2e/cypress/cypress/integration/private_project.spec.ts | +1 | −1 | Go to diff View file |
M | src/templates/project/navigation.mustache | +1 | −1 | Go to diff View file |
M | tests/e2e/full/cypress/integration/project_admin.spec.ts | +10 | −8 | Go to diff View file |