Remove leftover wait() in empty canvas e2e test

Created on 9 December 2024, 12 days ago

Overview

It was used in troubleshooting but shouldn't be there anymore.

Proposed resolution

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Page builder

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @bnjmnm
  • Merge request !456#3492734 remove wait β†’ (Closed) created by bnjmnm
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI
  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

    I think this is critical because I am not sure if we want to commit other issues since all test won't pass. Not sure how strict we are on that

  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

    Setting to "Needs Work" as there is active MR

    @jessebaker and @bnjmnm thanks for working on this!

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    Documenting where I'm at.

    There are three test cases: ['xb/node/2', 'xb/xb_page/2', 'xb/node/3']
    It will fail on the first of the three cases, regardless of order

    It can pass if an arbitrary wait is added to the test right after the first step of calling cy.loadURLandWaitForXBLoaded({ url: testCase }); Here is a run where that wait is added + and has a bunch of things logged - all request times, the # and duration between re-renders of several components, and the time it takes for src to load in the preview iframes. Enough is logged that it's a bit intense, but I suspect the info we need is in there.
    https://git.drupalcode.org/project/experience_builder/-/jobs/3652460

    Removes the wait, fails on xb/node/2 (the first), has all the same things logged
    https://git.drupalcode.org/project/experience_builder/-/jobs/3652423

    Removes the wait, fails on xb/xb_page/2' (the first), has all the same things logged
    https://git.drupalcode.org/project/experience_builder/-/jobs/3652698

    Since it is only the first run that fails AND it is fixed with an arbitrary wait at the beginning of the test, then one possibility is slowness from a resource that is then cached thus loading quick enough for later test runs Each request is logged with duration so I’ll dig into that more.

  • Merge request !466the solution without all the debug stuff β†’ (Merged) created by bnjmnm
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    🀦🀦🀦🀦🀦 This is proving challenging! As established earlier, adding a wait just after visiting the XB UI will reliably get the tests to pass.

    With further debugging, I've confirmed the failing tests find the a Dropzone, but the dropzone onAdd never fires. I think this now means narrowing down what about the wait allows the dropzone to accept drops. This shall continue.

  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

    changing status and priority back because of reasons above. chatted with @bnjmnm and those changes in #7 weren't intentional

    also a suggestion. Should we make a separate quick MR to either mark this test as skipped(if possible) or remove it completely? it would be easy to add back. As of now we are committing issues with this failing, which I think it is fine. But if you weren't in the know I could see someone wasting time on another issue trying to see if there changes somehow cause the failure.

    Just don't want people wasting time to figure this out.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    To my surprise, 0.x is green now?!

    This seems entirely coincidental though 😬

  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    Three things were addressed:
    After these two changes, tests started passing ~50% of the time instead of < 5%

    1. At first, it was always the first of the two iterations failing. Debugging this narrowed this down to the extra time required to load the page data form in the right panel, which in turn often delayed the preview ready past the default wait. Additional test runs would pass because the assets loaded by the form were cached and thus everything loaded quicker. This was fixed by adding a wait for an element within the page data form immediately after loading the XB UI
    2. Changed it so an assertion that requires going into the iframe occurs after a call to waitForElementContentInIframe because the repeat in waitForElementContentInIframe will repeat in a way that accounts for the iframe possibly being swapped, thus avoiding problems of the assertion being stuck inside a no-longer-active iframe.

    After the above, tests were passing maybe half the time which made it difficult to know what changes were impacting things. The one consistent thing in all the trial errors was the failures were always occurring with the second test regardless of what was being tested. No matter which test came first, it was always the second that would fail. For this, I turned the forEach into two separate tests and moved the Drupal install to beforeEach instead of before. At least as of the moment I'm typing this, making this change has resulted in the tests reliably passing. I will run a few more repeats to be sure and will weep if it continues to fail.

  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    To my surprise, 0.x is green now?!

    0.x still has an arbitrary wait that intermittently allows the tests to pass.

  • Pipeline finished with Skipped
    9 days ago
    #367058
    • bnjmnm β†’ committed cc2ce409 on 0.x
      Issue #3492734 by bnjmnm, hooroomoo: Empty-canvas e2e test is failing...
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    aaarrrggg

  • πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

    Nice, thanks @bnjmnm!

Production build 0.71.5 2024