Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flakey manage tokens test #5966

Open
kyranjamie opened this issue Nov 13, 2024 · 5 comments
Open

Flakey manage tokens test #5966

kyranjamie opened this issue Nov 13, 2024 · 5 comments
Assignees

Comments

@kyranjamie
Copy link
Collaborator

Running into this test failure on CI and local, but only very occasionally. It runs and then just kinda stops dead.

x in ~/dev/leather/extension                                                                      ±[●229][feat/bns-v2]
❯ p playwright test specs/manage-tokens/manage-tokens.spec.ts
[WebServer] [webpack-cli] No need to use the 'serve' command together with '{ watch: true | false }' or '--watch'/'--no-watch' configuration, it does not make sense.
[WebServer] <i> [webpack-dev-server] Project is running at:
[WebServer] <i> [webpack-dev-server] Loopback: http://localhost:3000/
[WebServer] <i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.142:3000/
[WebServer] <i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:3000/
[WebServer] <i> [webpack-dev-server] Content not from webpack is served from '/Users/kyranjamie/dev/leather/extension/public' directory
[WebServer] <i> [webpack-dev-server] 404s will fallback to '/index.html'

Running 1 test using 1 worker

  ✘  1 …ge-tokens/manage-tokens.spec.ts:18:8 › Manage tokens › that token can be removed from asset list and added back (15.4s)


  1) [chromium] › specs/manage-tokens/manage-tokens.spec.ts:18:8 › Manage tokens › that token can be removed from asset list and added back

    Error: Timed out 5000ms waiting for expect(locator).not.toBeAttached()

    Locator: getByTestId('asset-list').getByTestId('SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin')
    Expected: not attached
    Received: attached
    Call log:
      - expect.not.toBeAttached with timeout 5000ms
      - waiting for getByTestId('asset-list').getByTestId('SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin')
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"
      -   locator resolved to <div class="leather-my_space.02" data-testid="SP265WBWD4NH7TVPYQTVD23X3607NNK4484DTXQZ3.longcoin::longcoin">…</div>
      -   unexpected value "true"


      56 |
      57 |     // test that tokens are disabled
    > 58 |     await expect(sip10InAssetList).not.toBeAttached();
         |                                        ^
      59 |     await expect(brc20InAssetList).not.toBeAttached();
      60 |     await expect(src20InAssetList).not.toBeAttached();
      61 |     await expect(stx20InAssetList).not.toBeAttached();

        at /Users/kyranjamie/dev/leather/extension/tests/specs/manage-tokens/manage-tokens.spec.ts:58:40

  Slow test file: [chromium] › specs/manage-tokens/manage-tokens.spec.ts (15.4s)
  Consider splitting slow test files to speed up parallel execution
  1 failed
    [chromium] › specs/manage-tokens/manage-tokens.spec.ts:18:8 › Manage tokens › that token can be removed from asset list and added back

To open last HTML report run:

  pnpm exec playwright show-report
Copy link

linear bot commented Nov 13, 2024

Copy link
Collaborator

camerow commented Nov 22, 2024

Should this get worked on next cycle @kyranjamie?

@kyranjamie
Copy link
Collaborator Author

Absolutely, yeah. Has been causing issues. cc @alter-eggo who's been fighting with this

@alter-eggo
Copy link
Contributor

I fixed flaky test, though in a bit "hacky" way, problem there is not in a test itself, bug with wrong default switch value might happen in the wallet, though in a rare case, when user opens manage tokens very fast once opens the wallet and needed data is not there.

we need to add some loaders there, will take a look into it later

@kyranjamie
Copy link
Collaborator Author

Updated issue title to reflect this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants