Skip to content

Commit

Permalink
[e2e] use local samples + test open graphml format
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgirard committed Feb 15, 2024
1 parent f386a03 commit 776496d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions e2e/load-graph.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { expect, test } from "@playwright/test";

const BASE_URL = "https://raw.githubusercontent.com/gephi/gephi-lite/main/public/samples/";
const FILES = ["Java.gexf", "Les Miserables.gexf", "Power Grid.gexf"];
import { BASE_PATH } from "../vite.config";

const BASE_URL = `${BASE_PATH}/samples/`;
const FILES = ["Java.gexf", "Les Miserables.gexf", "Power Grid.gexf", "airlines.graphml"];

FILES.forEach((file) => {
test(`Loading '${file}' should work`, async ({ page }) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import react from "@vitejs/plugin-react-swc";
import checker from "vite-plugin-checker";
import { defineConfig } from "vitest/config";

// export BASE_PATH to reuse it in e2e test
export const BASE_PATH = "/gephi-lite";

export default defineConfig({
base: "/gephi-lite",
base: BASE_PATH,
plugins: [
react(),
checker({
Expand Down

0 comments on commit 776496d

Please sign in to comment.