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

debug: [email protected] + [email protected] + [email protected] #1797

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ jobs:
- uses: ./.github/actions/turbo-build
- name: Get zombienet
run: |
curl -L -O https://github.com/paritytech/zombienet/releases/download/v1.3.68/zombienet-linux-x64
curl -L -O https://github.com/paritytech/zombienet/releases/download/v1.3.91/zombienet-linux-x64
chmod +x zombienet-linux-x64
- name: Get polkadot
run: |
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.1.0/polkadot
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.6.0/polkadot
chmod +x polkadot
- name: Get polkadot execute worker
run: |
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.1.0/polkadot-execute-worker
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.6.0/polkadot-execute-worker
chmod +x polkadot-execute-worker
- name: Get polkadot prepare worker
run: |
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.1.0/polkadot-prepare-worker
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.6.0/polkadot-prepare-worker
chmod +x polkadot-prepare-worker
- name: Get polkadot-parachain
run: |
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.1.0/polkadot-parachain
curl -L -O https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v1.6.0/polkadot-parachain
chmod +x polkadot-parachain
- name: Run test
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
"start": "web-ext run --source-dir ./dist -t chromium --start-url http://localhost:5173",
"playwright": "playwright test --ui",
"playwright:install": "playwright install --with-deps chromium",
"playwright:chrome": "playwright test --project=chrome",
"playwright:chromium": "playwright test --project=chromium"
},
"dependencies": {
"@polkadot-api/substrate-client": "0.0.1-12c4b0432a814086c3c1a3b8052b31c72c2c9ad3.1.0",
"@substrate/light-client-extension-helpers": "workspace:*",
"smoldot": "2.0.17"
"smoldot": "2.0.18"
},
"devDependencies": {
"@playwright/test": "^1.41.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default defineConfig({
use: { ...devices["Desktop Chrome"] },
},
{
name: "Google Chrome",
name: "chrome",
use: { ...devices["Desktop Chrome"], channel: "chrome" },
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ test("sanity", async ({ page }) => {
await page.goto("/")

await expect(page).toHaveTitle(/extension-dapp/)
await expect(page.locator("h1")).toHaveText("Extension Test DApp")
await expect(page.locator("h1")).toHaveText("Extension Test DApp", {
timeout: 30 * 1000,
})

for (const chainName of ["Polkadot", "Kusama", "Westend"]) {
const chain = page.getByTestId(`chain${chainName}`)
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@substrate/light-client-extension-helpers": "workspace:^",
"@substrate/connect-extension-protocol": "workspace:^",
"@substrate/connect-known-chains": "workspace:^",
"smoldot": "2.0.17"
"smoldot": "2.0.18"
},
"devDependencies": {
"eslint": "^8.53.0",
Expand Down
21 changes: 15 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion projects/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"react-dom": "^18.2.0",
"react-icons": "^4.11.0",
"rxjs": "^7.8.1",
"smoldot": "2.0.17"
"smoldot": "2.0.18"
}
}
10 changes: 6 additions & 4 deletions zombienet-tests/src/0001-checkSync.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import { connect } from "./utils"

export async function run(nodeName: string, networkInfo: any) {
const { chainHead } = await connect(nodeName, networkInfo)
const client = await connect(nodeName, networkInfo)
let count = 0

await new Promise(async (resolve, reject) => {
const chainHeadFollower = chainHead(
await new Promise<void>(async (resolve, reject) => {
const chainHeadFollower = client.chainHead(
true,
(event) => {
if (event.type === "finalized" && ++count === 2) {
resolve(chainHeadFollower.unfollow())
chainHeadFollower.unfollow()
resolve()
}
},
reject,
)
})
client.destroy()
return count
}
10 changes: 6 additions & 4 deletions zombienet-tests/src/0002-checkSync.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import { connect } from "./utils"

export async function run(nodeName: string, networkInfo: any) {
const { chainHead } = await connect(nodeName, networkInfo, "100")
const client = await connect(nodeName, networkInfo, "100")
let count = 0

await new Promise(async (resolve, reject) => {
const chainHeadFollower = chainHead(
await new Promise<void>(async (resolve, reject) => {
const chainHeadFollower = client.chainHead(
true,
(event) => {
if (event.type === "finalized" && ++count === 2) {
resolve(chainHeadFollower.unfollow())
chainHeadFollower.unfollow()
resolve()
}
},
reject,
)
})
client.destroy()
return count
}
10 changes: 6 additions & 4 deletions zombienet-tests/src/0003-test-against-chainspecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ export async function run(nodeName: string) {
chainSpecPath: `../../packages/connect-known-chains/specs/${name}.json`,
}

const { chainHead } = await connect("light-client", networkInfo)
const client = await connect("light-client", networkInfo)
let count = 0
await new Promise(async (resolve, reject) => {
const chainHeadFollower = chainHead(
await new Promise<void>(async (resolve, reject) => {
const chainHeadFollower = client.chainHead(
true,
(event) => {
if (event.type === "finalized" && ++count === 2) {
resolve(chainHeadFollower.unfollow())
chainHeadFollower.unfollow()
resolve()
}
},
reject,
)
})
client.destroy()
return count
}
2 changes: 1 addition & 1 deletion zombienet-tests/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const isWellKnownChain = (input: string): input is WellKnownChain =>
let client: ScClient
const noop = () => {}
const ScProvider = (input: string, relayChainSpec?: string) => {
client ??= createScClient()
client ??= createScClient({ embeddedNodeConfig: { maxLogLevel: 4 } })
const addChain = (input: string, jsonRpcCallback?: JsonRpcCallback) =>
isWellKnownChain(input)
? client.addWellKnownChain(input, jsonRpcCallback)
Expand Down
Loading