Skip to content
Open
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
23 changes: 11 additions & 12 deletions apps/web/tests/getting-started.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,17 @@ test("onboarding defers, resumes and completes once; settings show one focused s
await expect(catalog.getByText("Metadata defaults saved.")).toBeVisible();
await page.goto("/settings#sources");
const mam = page.getByRole("form", { name: "MAM connection settings" });
if (!(await mam.isVisible()))
await page
.getByRole("region", { name: "MAM settings", exact: true })
.locator("summary")
.first()
.click();
if (!(await mam.isVisible()))
await page
.getByRole("region", { name: "MAM settings", exact: true })
.locator("summary")
.first()
.click();
// Open the MAM row, waiting for it to render before checking again, so a second click does not
// close it.
await expect(async () => {
if (!(await mam.isVisible()))
await page
.getByRole("region", { name: "MAM settings", exact: true })
.locator("summary")
.first()
.click();
await expect(mam).toBeVisible({ timeout: 1500 });
}).toPass();
await mam.getByText("Advanced settings", { exact: true }).click();
await mam
.getByLabel("MAM URL", { exact: true })
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/test_qbittorrent_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ def handler(request):
"http://qbit.test", "fixture", "fixture", transport=httpx.MockTransport(handler)
) as client:
with pytest.raises(AdapterError) as error:
# Only the pending case should run out of time. The others start a torrent probe
# process, which can take longer than 0.2 seconds on a busy machine.
await client.resolve_magnet(
"magnet:?xt=urn:btih:" + "a" * 40, interval=0.01, wait_seconds=0.2
"magnet:?xt=urn:btih:" + "a" * 40,
interval=0.01,
wait_seconds=0.2 if failure == "pending" else 10,
)
assert error.value.kind == (
FailureKind.TIMEOUT if failure == "pending" else FailureKind.PARSER
Expand Down