Skip to content

Commit

Permalink
Fix screenshot tests (#8289)
Browse files Browse the repository at this point in the history
* fix screenshot tests

* update screenshots

* apply feedback

---------

Co-authored-by: Michael Büßemeyer <[email protected]>
  • Loading branch information
MichaelBuessemeyer and Michael Büßemeyer authored Dec 18, 2024
1 parent fe53375 commit 32257f1
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import urljoin from "url-join";
import "test/mocks/lz4";
import type { PartialDatasetConfiguration } from "oxalis/store";
import path from "node:path";
Expand Down Expand Up @@ -27,7 +28,7 @@ process.on("unhandledRejection", (err, promise) => {
console.error("Unhandled rejection (promise: ", promise, ", reason: ", err, ").");
});
const BASE_PATH = path.join(__dirname, "../../../../frontend/javascripts/test/screenshots");
let URL = "https://master.webknossos.xyz";
let URL = "https://master.webknossos.xyz/";

if (!process.env.URL) {
console.warn(
Expand Down Expand Up @@ -114,7 +115,8 @@ test.before("Retrieve dataset ids", async () => {
3,
async () => {
const options = getDefaultRequestOptions(URL);
const url = `${URL}/api/datasets/disambiguate/sample_organization/${datasetName}/toId`;
const path = `/api/datasets/disambiguate/sample_organization/${datasetName}/toId`;
const url = urljoin(URL, path);
const response = await fetch(url, options);
const { id } = await response.json();
datasetNameToId[datasetName] = id;
Expand All @@ -124,7 +126,7 @@ test.before("Retrieve dataset ids", async () => {
);
}
});
test("Dataset IDs were retrieved successfully", (t) => {
test.serial("Dataset IDs were retrieved successfully", (t) => {
for (const datasetName of datasetNames) {
t.truthy(datasetNameToId[datasetName], `Dataset ID not found for "${datasetName}"`);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/javascripts/test/screenshots/ROI2017_wkw_fallback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/javascripts/test/screenshots/dsA_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/javascripts/test/screenshots/float_test_dataset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 32257f1

Please sign in to comment.