Overview

The Playwright tests in multivaluePropTypes.spec.ts could do with a refactor as they're consistently failing. There are a number of helper functions in a separate file which should either be ported to the main Canvas fixture object, or simplified. They're also too small i.e. each test is installing a new instance of Drupal so the current structure isn't very efficient

Issue fork canvas-3586288

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

justafish created an issue. See original summary.

penyaskito’s picture

Related: #3586022: Fix multivalue-form-design*.cy.js flakiness

We have a mix of Playwright and Cypress tests here, and all flaky.

justafish’s picture

Assigned: justafish » Unassigned
Status: Active » Needs review
wim leers’s picture

Assigned: Unassigned » narendrar
Priority: Normal » Critical
Issue tags: +technical debt
Related issues: +#3577946: Remove Canvas Dev Mode flag for Multi-Value Props support

@justafish: thoughts on #3586022: Fix multivalue-form-design*.cy.js flakiness?

Holy shit: tests/src/Playwright/tests/isolatedPerTest/multivaluePropTypes.spec.ts has a diffstat of +425,-2010 and another +0,-294 for deleting its helpers.

Wow.

I think this merits a review from @narendraR, who approved adding these originally in #3577946: Remove Canvas Dev Mode flag for Multi-Value Props support. This almost sounds too good to be true.

justafish’s picture

there is a lot of unnecessary repeats of happy-path tests in the existing one e.g. full component lifecycle like add, drag etc on every single type when they're using the same wrapper (e.g. Float vs Integer). I've replaced that with more specific tests for where those things deviate from each other, and some additional ones on top of that where I noticed different behaviours between types whilst manually testing, which has surfaced some bugs:

https://www.drupal.org/project/canvas/issues/3586357
https://www.drupal.org/project/canvas/issues/3586358
https://www.drupal.org/project/canvas/issues/3586289
https://www.drupal.org/project/canvas/issues/3586848

I've left @todos and commented out tests where relevant in this PR for the above issues (since they're already passing when they shouldn't be then there's no regression in coverage)

  • justafish committed f41e6c98 on 1.x
    feat: #3586288 Multivalue prop Playwright tests are flaky
    
    By: justafish...
justafish’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.