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
17 changes: 3 additions & 14 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,12 @@ watch(
<v-app>
<MainNavigation />
<v-main class="custom-background dropzone">
<GlassCard
variant="ui"
padding="pa-0"
class="island-wrapper overflow-hidden"
>
<Launcher
v-if="infraStore.status != Status.CREATED"
app-name="Vease"
logo="/logo.png"
/>
<GlassCard variant="ui" padding="pa-0" class="island-wrapper overflow-hidden">
<Launcher v-if="infraStore.status != Status.CREATED" app-name="Vease" logo="/logo.png" />
<NuxtPage style="z-index: 1" class="fill-height" />
</GlassCard>
<InfraConnected>
<DrawerManager
:ui-store="UIStore"
@files-dropped="handleFilesDropped"
/>
<DrawerManager :ui-store="UIStore" @files-dropped="handleFilesDropped" />
</InfraConnected>
</v-main>
<v-progress-linear
Expand Down
7 changes: 7 additions & 0 deletions tests/e2e/tests/edged_curve.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", true);
await vertexAttribute(window, "meshEdgesMenu");
await expect(window).toHaveScreenshot();
});
7 changes: 7 additions & 0 deletions tests/e2e/tests/grid2d.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", false);
await vertexAttribute(window, "meshCellsMenu");
await expect(window).toHaveScreenshot();
});
7 changes: 7 additions & 0 deletions tests/e2e/tests/grid3d.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", false);
await vertexAttribute(window, "meshCellsMenu");
await expect(window).toHaveScreenshot();
});
7 changes: 7 additions & 0 deletions tests/e2e/tests/model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -46,6 +47,12 @@ test("points visibility", async () => {
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "model", false);
await vertexAttribute(window, "modelStyleMenu");
await expect(window).toHaveScreenshot();
});

test("object tree context menu", async () => {
console.log("Right click on the BRep from object tree");
const mainObjectTree = window.getByTestId("mainObjectTree");
Expand Down
7 changes: 7 additions & 0 deletions tests/e2e/tests/point_set.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", true);
await vertexAttribute(window, "meshPointsMenu");
await expect(window).toHaveScreenshot();
});
7 changes: 7 additions & 0 deletions tests/e2e/tests/polygonal_surface.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", false);
await vertexAttribute(window, "meshPolygonsMenu");
await expect(window).toHaveScreenshot();
});
Binary file modified tests/e2e/tests/screenshots/edged_curve.test.js/load.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.
Comment thread
MaxNumerique marked this conversation as resolved.
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 tests/e2e/tests/screenshots/grid2d.test.js/load.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.
Binary file modified tests/e2e/tests/screenshots/grid3d.test.js/load.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 tests/e2e/tests/screenshots/model.test.js/load.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.
Binary file modified tests/e2e/tests/screenshots/model.test.js/points-visibility.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.
Binary file modified tests/e2e/tests/screenshots/point_set.test.js/load.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.
Binary file modified tests/e2e/tests/screenshots/polygonal_surface.test.js/load.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.
Binary file modified tests/e2e/tests/screenshots/solid.test.js/load.png
Binary file modified tests/e2e/tests/screenshots/solid.test.js/points-visibility.png
Binary file modified tests/e2e/tests/screenshots/tetrahedral_solid.test.js/load.png
Binary file modified tests/e2e/tests/screenshots/triangulated_surface.test.js/load.png
7 changes: 7 additions & 0 deletions tests/e2e/tests/solid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", false);
await vertexAttribute(window, "meshPolyhedraMenu");
await expect(window).toHaveScreenshot();
});
7 changes: 7 additions & 0 deletions tests/e2e/tests/triangulated_surface.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
loadData,
navigateToApp,
pointsVisibility,
vertexAttribute,
viewerContextMenu,
} from "@tests/utils.js";
import { test } from "@tests/fixtures.js";
Expand Down Expand Up @@ -44,3 +45,9 @@ test("points visibility", async () => {
await pointsVisibility(window, viewerObjectType, visibility);
await expect(window).toHaveScreenshot();
});

test("vertex attribute", async () => {
await pointsVisibility(window, "mesh", false);
await vertexAttribute(window, "meshPolygonsMenu");
await expect(window).toHaveScreenshot();
});
95 changes: 81 additions & 14 deletions tests/e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,88 @@ async function viewerContextMenu(window, x, y) {
}

async function pointsVisibility(window, viewerObjectType, visibility) {
let menuTestId = undefined,
switchTestId = undefined;
if (viewerObjectType === "model") {
menuTestId = "modelPointsMenu";
switchTestId = "modelPointsVisibilitySwitch";
} else if (viewerObjectType === "mesh") {
menuTestId = "meshPointsMenu";
switchTestId = "meshPointsVisibilitySwitch";
} else {
throw new Error(`Unknown viewer object type: ${viewerObjectType}`);
const menuTestId = viewerObjectType === "model" ? "modelPointsMenu" : "meshPointsMenu";
const switchTestId =
viewerObjectType === "model" ? "modelPointsVisibilitySwitch" : "meshPointsVisibilitySwitch";

const pointsMenuButton = window.getByTestId(menuTestId);
if (
!(await pointsMenuButton
.locator("button.menu-btn")
.evaluate((node) => node.classList.contains("v-btn--active")))
) {
await pointsMenuButton.click();
await window.waitForTimeout(afterActionWait);
}
await window.getByTestId(switchTestId).getByRole("checkbox")[visibility ? "check" : "uncheck"]();
await window.waitForTimeout(afterActionWait);
}

async function vertexAttribute(
window,
menuTestId,
{ attributeName = "points", colorMap = undefined, min = undefined, max = undefined } = {},
) {
const menuButton = window.getByTestId(menuTestId);
if (
!(await menuButton
.locator("button.menu-btn")
.evaluate((node) => node.classList.contains("v-btn--active")))
) {
await menuButton.click();
await window.waitForTimeout(afterActionWait);
}

await window.getByTestId("coloringStyleSelector").first().click();
await window.waitForTimeout(afterActionWait);

await window
.locator(".v-overlay-container")
.getByText("Vertex attribute")
.filter({ visible: true })
.first()
.click();
await window.waitForTimeout(afterActionWait);

await window.getByTestId("attributeSelector").first().click();
await window.waitForTimeout(afterActionWait);

await window
.locator(".v-overlay-container")
.getByText(attributeName, { exact: true })
.filter({ visible: true })
.first()
.click();
await window.waitForTimeout(afterActionWait);

if (colorMap) {
await window.getByTestId("colorMapPicker").first().click();
await window.waitForTimeout(afterActionWait);

await window.getByPlaceholder("Search presets...").fill(colorMap);
await window.waitForTimeout(afterActionWait);

const pointsMenuButton = await window.getByTestId(menuTestId);
await pointsMenuButton.click();
const pointsVisibilitySwitch = await window.getByTestId(switchTestId).getByRole("checkbox");
await pointsVisibilitySwitch[visibility ? "check" : "uncheck"]();
await window
.getByTestId("colorMapList")
.getByText(colorMap, { exact: true })
.filter({ visible: true })
.first()
.click();
await window.waitForTimeout(afterActionWait);
}

if (min !== undefined) {
const input = window.getByTestId("attributeMinInput").first().locator("input");
await input.fill(min.toString());
await input.press("Enter");
await window.waitForTimeout(afterActionWait);
}
if (max !== undefined) {
const input = window.getByTestId("attributeMaxInput").first().locator("input");
await input.fill(max.toString());
await input.press("Enter");
await window.waitForTimeout(afterActionWait);
}
await window.waitForTimeout(afterActionWait);
}

Expand All @@ -177,4 +243,5 @@ export {
navigateToApp,
pointsVisibility,
viewerContextMenu,
vertexAttribute,
};
Loading