-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { test } from '@playwright/test' | ||
import { create, type KuboRPCClient } from 'kubo-rpc-client' | ||
import { loadBlockFixtures } from './fixtures/load-block-fixtures.js' | ||
import { testExploredCid } from './fixtures/test-explore-cid.js' | ||
|
||
test.describe('edge-cases', () => { | ||
/** | ||
* @type {ReturnType<import('kubo-rpc-client')['create']>} | ||
*/ | ||
let ipfs: KuboRPCClient | ||
test.beforeEach(async () => { | ||
ipfs = create(process.env.IPFS_RPC_ADDR) | ||
}) | ||
|
||
test('links without explicit paths can be navigated to', async ({ page }) => { | ||
const cid = 'Qmd1WaiaEBDe7H3a3U1CToaoaFsxUXEnmhw68ub5u1iY7Q' | ||
await loadBlockFixtures({ | ||
ipfs, | ||
blockCid: [ | ||
'QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D', | ||
'QmUh6QSTxDKX5qoNU1GoogbhTveQQV9JMeQjfFVchAtd5Q', | ||
'QmXPqQjySvisWjE11dkrANGmfvUsmPN5RP9oWVRnR7RQuu', | ||
'QmVFemV13MkWS7xyDzcJbBd5qL31NXAHcsYk4wy4RhwHqh', | ||
cid | ||
] | ||
}) | ||
|
||
await page.goto('/#/explore/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D/albums/QXBvbGxvIDE0IE1hZ2F6aW5lIDY0L0xM/21076550124_dfaa21d664_o.jpg') | ||
// wait for the link at index 0 to be visible. it has text of "Qmd1WaiaEBDe7H3a3U1CToaoaFsxUXEnmhw68ub5u1iY7Q" | ||
const link0 = await page.waitForSelector(`"${cid}"`) | ||
// click on the link at index 0 | ||
await link0.click() | ||
|
||
await testExploredCid({ | ||
fillOutForm: false, | ||
page, | ||
cid, | ||
humanReadableCID: 'base58btc - cidv0 - dag-pb - sha2-256~256~D9F8142F34B8CC605DBD57745F1221836E616CDA5B5B9B5BE88D364E13CE39B7', | ||
type: 'dag-pb' | ||
}) | ||
}) | ||
}) |
Binary file added
BIN
+8.05 KB
test/e2e/fixtures/explore/blocks/QmUh6QSTxDKX5qoNU1GoogbhTveQQV9JMeQjfFVchAtd5Q
Binary file not shown.
Binary file added
BIN
+921 Bytes
test/e2e/fixtures/explore/blocks/QmVFemV13MkWS7xyDzcJbBd5qL31NXAHcsYk4wy4RhwHqh
Binary file not shown.
Binary file added
BIN
+22.7 KB
test/e2e/fixtures/explore/blocks/QmXPqQjySvisWjE11dkrANGmfvUsmPN5RP9oWVRnR7RQuu
Binary file not shown.
Binary file added
BIN
+256 KB
test/e2e/fixtures/explore/blocks/Qmd1WaiaEBDe7H3a3U1CToaoaFsxUXEnmhw68ub5u1iY7Q
Binary file not shown.