Skip to content

Commit 30ea02c

Browse files
authored
Merge pull request #549 from Geode-solutions/feat/color-tests
Feat/color tests
2 parents e5faa7e + 9f424a1 commit 30ea02c

36 files changed

Lines changed: 170 additions & 18 deletions

app/components/Auth/AuthForgotPasswordDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { emailRules } from "~/utils/validation.js";
44
55
const show = defineModel({ type: Boolean, default: false });
66
7-
const email = defineModel("email");
7+
const email = defineModel("email", { type: String });
88
99
const { loading } = defineProps({
1010
loading: { type: Boolean, default: false },

app/components/Auth/AuthForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const { isLogin, loading } = defineProps({
88
99
const error = defineModel("error", { type: String, default: "" });
1010
const successMessage = defineModel("successMessage", { type: String, default: "" });
11-
const email = defineModel("email");
12-
const password = defineModel("password");
13-
const confirmPassword = defineModel("confirmPassword");
11+
const email = defineModel("email", { type: String });
12+
const password = defineModel("password", { type: String });
13+
const confirmPassword = defineModel("confirmPassword", { type: String });
1414
1515
const emit = defineEmits(["submit", "toggle-mode", "forgot-password"]);
1616

app/components/ImportFile.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { useUIStore } from "@vease/stores/ui";
44
55
const emit = defineEmits(["update_values", "increment_step", "decrement_step", "reset_values"]);
66
7-
const { filenames, geode_object_type } = defineProps({
7+
const { filenames, geodeObjectType } = defineProps({
88
filenames: { type: Array, required: true },
9-
geode_object_type: { type: String, required: true },
9+
geodeObjectType: { type: String, required: true },
1010
});
1111
1212
const UIStore = useUIStore();
@@ -21,7 +21,7 @@ async function import_files() {
2121
toggle_loading();
2222
const files_array = filenames.map((filename) => ({
2323
filename,
24-
geode_object_type,
24+
geode_object_type: geodeObjectType,
2525
}));
2626
try {
2727
await importWorkflow(files_array);

app/components/NewProject.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup>
22
const emit = defineEmits(["close"]);
3-
const { show_dialog } = defineProps({
4-
show_dialog: { type: Boolean, required: true },
3+
const { showDialog } = defineProps({
4+
showDialog: { type: Boolean, required: true },
55
});
66
77
const isVisible = computed({
8-
get: () => show_dialog,
8+
get: () => showDialog,
99
set: (value) => {
1010
if (!value) {
1111
emit("close");

app/components/OpenProject.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup>
22
const emit = defineEmits(["close"]);
3-
const { show_dialog } = defineProps({
4-
show_dialog: { type: Boolean, required: true },
3+
const { showDialog } = defineProps({
4+
showDialog: { type: Boolean, required: true },
55
});
66
77
const isVisible = computed({
8-
get: () => show_dialog,
8+
get: () => showDialog,
99
set: (value) => {
1010
if (!value) {
1111
emit("close");

app/components/StepImport.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const stepper_tree = useStepperTree(
3636
component_options: {
3737
multiple: true,
3838
files,
39-
auto_upload,
40-
show_overlay: false,
39+
autoUpload: auto_upload,
40+
showOverlay: false,
4141
},
4242
},
4343
chips: computed(() => files.value.map((file) => file.name)),
@@ -58,7 +58,7 @@ const stepper_tree = useStepperTree(
5858
component_name: shallowRef(MissingFilesSelector),
5959
component_options: {
6060
multiple: true,
61-
geode_object_type,
61+
geodeObjectType: geode_object_type,
6262
filenames: computed(() => files.value.map((file) => file.name)),
6363
},
6464
},
@@ -69,7 +69,7 @@ const stepper_tree = useStepperTree(
6969
component: {
7070
component_name: shallowRef(ImportFile),
7171
component_options: {
72-
geode_object_type,
72+
geodeObjectType: geode_object_type,
7373
filenames: computed(() => files.value.map((file) => file.name)),
7474
},
7575
},
@@ -108,5 +108,5 @@ watch(
108108
</script>
109109

110110
<template>
111-
<Stepper :stepper_tree="stepper_tree" @close="handleClose" @reset_values="reset_values" />
111+
<Stepper :stepperTree="stepper_tree" @close="handleClose" @reset_values="reset_values" />
112112
</template>

tests/e2e/tests/edged_curve.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { expect } from "@playwright/test";
66
// Local imports
77
import {
88
beforeAllTimeout,
9+
changeColor,
10+
changeOpacity,
911
edgeAttribute,
1012
loadData,
1113
navigateToApp,
@@ -20,6 +22,7 @@ const inputFilename = "test.og_edc3d";
2022
const attributeName = "edges";
2123
let window = undefined;
2224
let cleanup = undefined;
25+
const OPACITY_50 = 50;
2326

2427
test.beforeAll(async ({ mode, browser }) => {
2528
({ window, cleanup } = await navigateToApp(mode, browser));
@@ -59,3 +62,13 @@ test("edge attribute", async () => {
5962
await edgeAttribute(window, "meshEdgesMenu", attributeName);
6063
await expect(window).toHaveScreenshot();
6164
});
65+
66+
test("color", async () => {
67+
await changeColor(window, "meshEdgesMenu");
68+
await expect(window).toHaveScreenshot();
69+
});
70+
71+
test("opacity", async () => {
72+
await changeOpacity(window, "meshEdgesMenu", OPACITY_50);
73+
await expect(window).toHaveScreenshot();
74+
});

tests/e2e/tests/grid2d.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { expect } from "@playwright/test";
77
import {
88
beforeAllTimeout,
99
cellAttribute,
10+
changeColor,
11+
changeOpacity,
1012
loadData,
1113
navigateToApp,
1214
pointsVisibility,
@@ -20,6 +22,7 @@ const inputFilename = "test.og_rgd2d";
2022
const attributeName = "RGB_data";
2123
let window = undefined;
2224
let cleanup = undefined;
25+
const OPACITY_50 = 50;
2326

2427
test.beforeAll(async ({ mode, browser }) => {
2528
({ window, cleanup } = await navigateToApp(mode, browser));
@@ -59,3 +62,13 @@ test("cell attribute", async () => {
5962
await cellAttribute(window, "meshCellsMenu", attributeName);
6063
await expect(window).toHaveScreenshot();
6164
});
65+
66+
test("color", async () => {
67+
await changeColor(window, "meshCellsMenu");
68+
await expect(window).toHaveScreenshot();
69+
});
70+
71+
test("opacity", async () => {
72+
await changeOpacity(window, "meshCellsMenu", OPACITY_50);
73+
await expect(window).toHaveScreenshot();
74+
});

tests/e2e/tests/grid3d.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { expect } from "@playwright/test";
77
import {
88
beforeAllTimeout,
99
cellAttribute,
10+
changeColor,
11+
changeOpacity,
1012
loadData,
1113
navigateToApp,
1214
pointsVisibility,
@@ -20,6 +22,7 @@ const inputFilename = "test.og_rgd3d";
2022
const attributeName = "int_attribute";
2123
let window = undefined;
2224
let cleanup = undefined;
25+
const OPACITY_50 = 50;
2326

2427
test.beforeAll(async ({ mode, browser }) => {
2528
({ window, cleanup } = await navigateToApp(mode, browser));
@@ -59,3 +62,13 @@ test("cell attribute", async () => {
5962
await cellAttribute(window, "meshCellsMenu", attributeName);
6063
await expect(window).toHaveScreenshot();
6164
});
65+
66+
test("color", async () => {
67+
await changeColor(window, "meshCellsMenu");
68+
await expect(window).toHaveScreenshot();
69+
});
70+
71+
test("opacity", async () => {
72+
await changeOpacity(window, "meshCellsMenu", OPACITY_50);
73+
await expect(window).toHaveScreenshot();
74+
});

tests/e2e/tests/model.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { expect } from "@playwright/test";
77
import {
88
afterActionWait,
99
beforeAllTimeout,
10+
changeColor,
11+
changeOpacity,
1012
loadData,
1113
navigateToApp,
1214
pointsVisibility,
@@ -22,6 +24,7 @@ const attributeName = "tetrahedron_vertices";
2224
let window = undefined;
2325
let cleanup = undefined;
2426
const OFFSET = 10;
27+
const OPACITY_50 = 50;
2528

2629
test.beforeAll(async ({ mode, browser }) => {
2730
({ window, cleanup } = await navigateToApp(mode, browser));
@@ -62,6 +65,16 @@ test("polyhedron attribute", async () => {
6265
await expect(window).toHaveScreenshot();
6366
});
6467

68+
test("color", async () => {
69+
await changeColor(window, "modelStyleMenu");
70+
await expect(window).toHaveScreenshot();
71+
});
72+
73+
test("opacity", async () => {
74+
await changeOpacity(window, "modelStyleMenu", OPACITY_50);
75+
await expect(window).toHaveScreenshot();
76+
});
77+
6578
test("object tree context menu", async () => {
6679
console.log("Right click on the BRep from object tree");
6780
const mainObjectTree = window.getByTestId("mainObjectTree");

0 commit comments

Comments
 (0)