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

Minimal E2E tests #134

Closed
14 tasks done
lidel opened this issue Mar 20, 2024 · 4 comments · Fixed by #145 or #163
Closed
14 tasks done

Minimal E2E tests #134

lidel opened this issue Mar 20, 2024 · 4 comments · Fixed by #145 or #163
Assignees

Comments

@lidel
Copy link
Member

lidel commented Mar 20, 2024

This issue tracks the minimal set of end-to-end regression tests we want to have,
along with pointers at preexisting fixtures we could reuse.

Goal

We want a minimal set of regression tests that are easy to maintain, don't take a lot of space.

Coverage does not need to be complete. We will add gateway-conformance in the future. We need something before that happens.

Minimal regression tests

Below is a quick brain dump of E2E tests we need to tackle development going forward.

SW configuration screen

Critical gateway modes

We can test these in isolation with hello bytes inlined inside of identity CID:

  • Confirm path gateway mode works
  • Confirm subdomain gateway mode detection and origin isolation works - test: e2e subdomain redirect tests #151
    • Open http://sw.localhost:{port}/ipfs/bafkqablimvwgy3y and confirm the final response was HTTP 301 to http://bafkqablimvwgy3y.ipfs.sw.localhost:{port}
    • Open http://bafkqablimvwgy3y.ipfs.sw.localhost:{port} and confirm the final response was HTTP 200 and the body was hello

Basic web hosting

We can reuse fixtures from gateway-conformance:

@SgtPooki
Copy link
Member

Opening root document ends up on #ipfs-sw-config

Do we want to change the landing page or do you mean we want to confirm new subdomains land on ipfs-sw-config page? or that accessing <rootDomain>/#/ipfs-sw-config loads the config page

The rest make sense

@lidel
Copy link
Member Author

lidel commented Mar 25, 2024

I meant just a quick smoke test to confirm config page is rendered on initial load, when there is no SW.

Have separate one for sw.localhost domain, and cid.ipfs.sw.localhost:port subdomain, as we may enable autoreload for subdomain at some point, and it will require separate test anyway.

@SgtPooki
Copy link
Member

SgtPooki commented Mar 26, 2024

@lidel all e2e tests are merged in except tests for confirming config/redirect page loading

Only thing is a question I had in #159 regarding testing all 872 bytes for the Range: bytes=2200- request for /ipfs/QmYhmPjhFjYFyaoiuNzYv8WGavpSRDwdHWe5B4M5du5Rtk test

@SgtPooki
Copy link
Member

#162 was also merged that can allow for testing inbrowser.dev and inbrowser.link.

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