Skip to content

fix: solve flaky e2e tests #2123

Open
Open
@SgtPooki

Description

@SgtPooki

from https://github.com/ipfs/ipfs-webui/actions/runs/5264059194/jobs/9514890050#step:8:381

1) remote-api.test.js:228:5 › Remote API tests › API @ URL › should show full multiaddr on Status page 

    Test timeout of 90000ms exceeded.

    Error: page.waitForFunction: Target closed

      141 |       } catch (_) {}
      142 |       // await page.waitForFunction(`localStorage.getItem('ipfsApi') && localStorage.getItem('ipfsApi').includes('${endpoint}')`)
    > 143 |       await page.waitForFunction(endpoint => window.localStorage.getItem('ipfsApi') && window.localStorage.getItem('ipfsApi').includes(endpoint), endpoint)
          |                  ^
      144 |       return
      145 |     }
      146 |     await page.waitForFunction(() => window.localStorage.getItem('ipfsApi') === null)

        at waitForIpfsApiEndpoint (/home/runner/work/ipfs-webui/ipfs-webui/test/e2e/remote-api.test.js:143:18)
        at switchIpfsApiEndpointViaSettings (/home/runner/work/ipfs-webui/ipfs-webui/test/e2e/remote-api.test.js:123:11)
        at /home/runner/work/ipfs-webui/ipfs-webui/test/e2e/remote-api.test.js:229:7

    Pending operations:
      - page.waitForFunction at test/e2e/remote-api.test.js:143:18


  2) remote-api.test.js:234:5 › Remote API tests › API @ URL › should show full multiaddr on Settings page 

    Test timeout of 90000ms exceeded.

    Error: page.waitForFunction: Target closed

      141 |       } catch (_) {}
      142 |       // await page.waitForFunction(`localStorage.getItem('ipfsApi') && localStorage.getItem('ipfsApi').includes('${endpoint}')`)
    > 143 |       await page.waitForFunction(endpoint => window.localStorage.getItem('ipfsApi') && window.localStorage.getItem('ipfsApi').includes(endpoint), endpoint)
          |                  ^
      144 |       return
      145 |     }
      146 |     await page.waitForFunction(() => window.localStorage.getItem('ipfsApi') === null)

        at waitForIpfsApiEndpoint (/home/runner/work/ipfs-webui/ipfs-webui/test/e2e/remote-api.test.js:143:18)
        at switchIpfsApiEndpointViaSettings (/home/runner/work/ipfs-webui/ipfs-webui/test/e2e/remote-api.test.js:123:11)
        at /home/runner/work/ipfs-webui/ipfs-webui/test/e2e/remote-api.test.js:235:7

    Pending operations:
      - page.waitForFunction at test/e2e/remote-api.test.js:143:18


  2 flaky
    remote-api.test.js:228:5 › Remote API tests › API @ URL › should show full multiaddr on Status page 
    remote-api.test.js:234:5 › Remote API tests › API @ URL › should show full multiaddr on Settings page 

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High: Likely tackled by core team if no one steps upexp/beginnerCan be confidently tackled by newcomersgood first issueGood issue for new contributorshelp wantedSeeking public contribution on this issuekind/maintenanceWork required to avoid breaking changes or harm to project's status quokind/testTesting workstatus/readyReady to be worked

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions