Skip to content

Commit

Permalink
Add zarr 3 test
Browse files Browse the repository at this point in the history
  • Loading branch information
frcroth committed Oct 21, 2024
1 parent 0968608 commit 2d6065a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
4 changes: 0 additions & 4 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ oidc.disabled=OIDC is disabled
oidc.configuration.invalid=OIDC configuration is invalid
oidc.authentication.failed=Failed to register / log in via Single-Sign-On (SSO with OIDC)

braintracing.new=An account on braintracing.org was created for you. You can use the same credentials as on WEBKNOSSOS to login.
braintracing.error=We could not automatically create an account for you on braintracing.org. Please do it on your own.
braintracing.exists=Great, you already have an account on braintracing.org. Please double check that you have uploaded all requested information.

dataset=Dataset
dataset.notFound=Dataset {0} does not exist or could not be accessed
dataset.notFoundConsiderLogin=Dataset {0} does not exist or could not be accessed. You may need to log in.
Expand Down
26 changes: 23 additions & 3 deletions frontend/javascripts/test/backend-snapshot-tests/datasets.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,28 @@ test("Zarr streaming", async (t) => {
const zattrs = await zattrsResp.text();
t.snapshot(zattrs);

const rawData = await fetch("/data/zarr/Organization_X/test-dataset/segmentation/1/0.0.0", {});
const data = await rawData.arrayBuffer();
const base64 = btoa(String.fromCharCode(...new Uint8Array(data)));
const rawDataResponse = await fetch(
"/data/zarr/Organization_X/test-dataset/segmentation/1/0.1.1.0",
{},
);
const bytes = await rawDataResponse.arrayBuffer();
const base64 = btoa(String.fromCharCode(...new Uint8Array(bytes)));
t.snapshot(base64);
});

test("Zarr 3 streaming", async (t) => {
const zarrJsonResp = await fetch(
"/data/zarr3_experimental/Organization_X/test-dataset/segmentation/zarr.json",
{},
);
const zarrJson = await zarrJsonResp.text();
t.snapshot(zarrJson);

const rawDataResponse = await fetch(
"/data/zarr3_experimental/Organization_X/test-dataset/segmentation/1/0.1.1.0",
{},
);
const bytes = await rawDataResponse.arrayBuffer();
const base64 = btoa(String.fromCharCode(...new Uint8Array(bytes)));
t.snapshot(base64);
});

Large diffs are not rendered by default.

Binary file not shown.

0 comments on commit 2d6065a

Please sign in to comment.