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

Fix end-to-end tests under js-ipfs #1737

Closed
lidel opened this issue Mar 25, 2021 · 7 comments
Closed

Fix end-to-end tests under js-ipfs #1737

lidel opened this issue Mar 25, 2021 · 7 comments
Labels
effort/days Estimated to take multiple days, but less than a week exp/wizard Extensive knowledge (implications, ramifications) required kind/test Testing work need/analysis Needs further analysis before proceeding P1 High: Likely tackled by core team if no one steps up
Milestone

Comments

@lidel
Copy link
Member

lidel commented Mar 25, 2021

Extracted from #1713

Right now e2e tests do not pass against js-ipfs:

npm ci && npm run build && E2E_IPFSD_TYPE=js npm run test:e2e

Note: we are unable to ship webui with js-ipfs without fixing this.
In theory, it is ok to ship release that only works with go-ipfs and fix this later, using tribute rotation, but would be way better to ship release to both JS and GO.

@lidel lidel added P3 Low: Not priority right now kind/test Testing work need/analysis Needs further analysis before proceeding exp/wizard Extensive knowledge (implications, ramifications) required effort/days Estimated to take multiple days, but less than a week labels Mar 25, 2021
@lidel lidel added this to the v2.12 milestone Mar 25, 2021
@lidel
Copy link
Member Author

lidel commented Mar 25, 2021

For reference:

(node:22646) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
 FAIL  test/e2e/navigation.test.js
  Navigation menu
    ✓ should work for Status page (152 ms)
    ✓ should work for Files page (246 ms)
    ✕ should work for Explore page (16 ms)
    ✓ should work for Peers page (373 ms)
    ✓ should work for Settings page (434 ms)

  ● Navigation menu › should work for Explore page





  console.error
    Unhandled error

      at process.uncaught (../../node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine/Env.js:248:21)
      at processEmit [as emit] (../../node_modules/signal-exit/index.js:161:32)
      at handleError (../../node_modules/jest-environment-puppeteer/lib/PuppeteerEnvironment.js:17:11)
      at ../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:75
          at Array.map (<anonymous>)
      at Object.emit (../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:56)

  console.error
    

      at process.uncaught (../../node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine/Env.js:249:21)
      at processEmit [as emit] (../../node_modules/signal-exit/index.js:161:32)
      at handleError (../../node_modules/jest-environment-puppeteer/lib/PuppeteerEnvironment.js:17:11)
      at ../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:75
          at Array.map (<anonymous>)
      at Object.emit (../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:56)

 PASS  test/e2e/files.test.js
  Files screen
    ✓ should have the active Add menu (245 ms)
    ✓ should allow for a successful import of two files (497 ms)

 PASS  test/e2e/explore.test.js
  Explore screen
    ✓ should have Project Apollo Archive as one of examples (71 ms)
    ✓ should open arbitrary CID (534 ms)

 PASS  test/e2e/status.test.js
  Status page
    ✓ should have Status menu item (21 ms)
    ✓ should inform it is sucessfully connected to IPFS (22 ms)
    ✓ should display Peer ID of real IPFS node (27 ms)

  console.error
    Unhandled error

      at process.uncaught (../../node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine/Env.js:248:21)
      at processEmit [as emit] (../../node_modules/signal-exit/index.js:161:32)
      at handleError (../../node_modules/jest-environment-puppeteer/lib/PuppeteerEnvironment.js:17:11)
      at ../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:75
          at Array.map (<anonymous>)
      at Object.emit (../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:56)

  console.error
    

      at process.uncaught (../../node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine/Env.js:249:21)
      at processEmit [as emit] (../../node_modules/signal-exit/index.js:161:32)
      at handleError (../../node_modules/jest-environment-puppeteer/lib/PuppeteerEnvironment.js:17:11)
      at ../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:75
          at Array.map (<anonymous>)
      at Object.emit (../../node_modules/puppeteer/vendor/mitt/src/index.ts:81:56)

 PASS  test/e2e/settings.test.js
  Settings screen
    ✓ should show config of IPFS node (83 ms)

 PASS  test/e2e/peers.test.js (14.634 s)
  Peers screen
    ✓ should have a clickable "Add connection" button (216 ms)
    ✓ should confirm connection after "Add connection"  (1345 ms)
    ✓ should have a peer from a "Local Network" (10212 ms)

Test Suites: 2 failed, 5 passed, 7 total
Tests:       6 failed, 20 passed, 26 total
Snapshots:   0 total
Time:        48.063 s, estimated 83 s
Ran all test suites.

@lidel
Copy link
Member Author

lidel commented Mar 26, 2021

GO tests seem to be flaky now too :(
https://app.circleci.com/pipelines/github/ipfs/ipfs-webui/830/workflows/e38bc1d3-f5e4-4576-acb7-b9c8417b9fb6/jobs/4936

Might be Travis. Try slowing down/bumping timeouts.

@BigLep
Copy link

BigLep commented Apr 1, 2021

@lidel : I know I don't have the full context here, but I don't want fixing tests to be optional. If we need help here from Go folks, lets call it out (and at the latest at the next Triage session). Basically, I'm worried about this being at P3.

@lidel lidel added P1 High: Likely tackled by core team if no one steps up and removed P3 Low: Not priority right now labels Apr 1, 2021
@lidel
Copy link
Member Author

lidel commented Apr 1, 2021

@BigLep I agree that e2e tests should not be optional.

Filled as P3 because initially the issue was limited to js-ipfs interop (which we dont use in ipfs-desktop, so low priority), but since then I confirmed flaky tests occur for go-ipfs sometimes, so bumping to P1.

Puppeteer (tool used for e2e test orchestration in real browser) has been getting buggier with each release, seems to be effectively deprecated for a while. We planned to move to playwright (more modern replacement), but our GUI team got dissolved and here we are today.

I don't think it's productive to spend time on fixing puppeteer. We've already spent too much time on it.
Switching to playwright should fix flakiness – could be a task for a tribute familiar with JS ecosystem.

@BigLep
Copy link

BigLep commented Apr 1, 2021

@lidel : sounds good. Is the switch to Playwright something we should ask our "IP JS" tribute to do, or does it require someone with more browser experience? Either way, I assume we'll need a tracking task for this work and that this issue (#1737) will be dependent on?

@lidel
Copy link
Member Author

lidel commented Apr 3, 2021

@lidel lidel modified the milestones: v2.12, v2.13 Apr 13, 2021
@lidel lidel pinned this issue Sep 10, 2021
@lidel lidel modified the milestones: v2.13, v2.14 Jan 17, 2022
lidel added a commit that referenced this issue Feb 1, 2022
Does not make sense to have CI red all the time.

Restoring interop with js-ipfs is tracked in:
#1737
@SgtPooki
Copy link
Member

SgtPooki commented Dec 5, 2022

wontfix. we're decoupling from js-ipfs

@SgtPooki SgtPooki closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
@SgtPooki SgtPooki unpinned this issue Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week exp/wizard Extensive knowledge (implications, ramifications) required kind/test Testing work need/analysis Needs further analysis before proceeding P1 High: Likely tackled by core team if no one steps up
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants