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

test: improve explore page tests #2106

Closed
SgtPooki opened this issue Mar 13, 2023 · 0 comments · Fixed by #2109
Closed

test: improve explore page tests #2106

SgtPooki opened this issue Mar 13, 2023 · 0 comments · Fixed by #2109
Labels
exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature kind/test Testing work P2 Medium: Good to have, but can wait until someone steps up

Comments

@SgtPooki
Copy link
Member

address #2098 (comment)

clickFirstExploreChild is too naive for most tests, we need to test explicit CIDs

I am afraid this is too naive – for Apollo archives it hits the top level README.txt and never goes deeper than 1 lovel in:

🟢 http://localhost:3000/#/explore/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D/README.txt
We have hardcoded CIDs of examples, we need to add more explicit test than parent dir.

Perhaps add a hardcoded, deterministic path that goes deep within directory tree, and then confirm it loaded the data with assert of expected info via testExploredCid ? This should be a good smoke-test.
No need to be inventive, just reuse paths marked as 🔴 and ℹ️ I mentioned (use the longest one, one test for dag-pb and dag-cbor each should be enough)
(not sure if needed, but in case you see test being slow/failing on CID) we can ipfs block get specific blocks that are used in tests as static test vectors into test directory, and ipfs block put them before running E2E tests, so they work in offline mode. (you can see which blocks are needed by manually traversing dag in IPLD Explorer and looking at block requests in Network tab in devtools)

This is being opened as a followup issue, because there was not much testing for the explore page to begin with, and significant tests have been added in #2098 that work well for what's already there.

This issue is intended to improve those tests even further.

@SgtPooki SgtPooki added the need/triage Needs initial labeling and prioritization label Mar 13, 2023
@whizzzkid whizzzkid added help wanted Seeking public contribution on this issue exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up kind/test Testing work kind/enhancement A net-new feature or improvement to an existing feature and removed need/triage Needs initial labeling and prioritization labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature kind/test Testing work P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants