@@ -3819,6 +3819,40 @@ test.describe("Workspace Manager V2 bootstrap", () => {
38193819 pointRounding: [false, true, false, false],
38203820 strokeLinejoin: "miter"
38213821 });
3822+ await page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-point-round='true'][data-polygon-point-index='2']").check();
3823+ await expect(page.locator("#statusLog")).toHaveValue(/OK Updated point 3 rounding to round for shape row \d+\./);
3824+ const polylineTwoRoundedJoints = await page.locator(`#objectVectorStudioV2RenderSurface [data-shape-index="${polylineIndex}"]`).evaluate((shape) => {
3825+ const markers = Array.from(document.querySelectorAll("#objectVectorStudioV2RenderSurface [data-point-style-caps='polyline'] [data-point-style-cap]")).map((marker) => marker.dataset.pointStyleCap);
3826+ return {
3827+ jointStyle: shape.dataset.pointStyle || "",
3828+ markers,
3829+ pointRounding: window.__objectVectorStudioV2App.selectedShape().style.pointRounding,
3830+ strokeLinejoin: shape.getAttribute("stroke-linejoin")
3831+ };
3832+ });
3833+ expect(polylineTwoRoundedJoints).toEqual({
3834+ jointStyle: "square",
3835+ markers: ["point-1", "point-2"],
3836+ pointRounding: [false, true, true, false],
3837+ strokeLinejoin: "miter"
3838+ });
3839+ await page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-point-round='true'][data-polygon-point-index='1']").uncheck();
3840+ await expect(page.locator("#statusLog")).toHaveValue(/OK Updated point 2 rounding to square for shape row \d+\./);
3841+ const polylineIndependentJoint = await page.locator(`#objectVectorStudioV2RenderSurface [data-shape-index="${polylineIndex}"]`).evaluate((shape) => {
3842+ const markers = Array.from(document.querySelectorAll("#objectVectorStudioV2RenderSurface [data-point-style-caps='polyline'] [data-point-style-cap]")).map((marker) => marker.dataset.pointStyleCap);
3843+ return {
3844+ jointStyle: shape.dataset.pointStyle || "",
3845+ markers,
3846+ pointRounding: window.__objectVectorStudioV2App.selectedShape().style.pointRounding,
3847+ strokeLinejoin: shape.getAttribute("stroke-linejoin")
3848+ };
3849+ });
3850+ expect(polylineIndependentJoint).toEqual({
3851+ jointStyle: "square",
3852+ markers: ["point-2"],
3853+ pointRounding: [false, false, true, false],
3854+ strokeLinejoin: "miter"
3855+ });
38223856
38233857 await page.locator('[data-shape-tool="text"]').click();
38243858 await clickObjectVectorLogicalPoint(page, 70, 60);
@@ -4000,6 +4034,23 @@ test.describe("Workspace Manager V2 bootstrap", () => {
40004034 await expect(page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-point-delete='true']")).toHaveCount(4);
40014035 await expect(page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-point-select='true']")).toHaveCount(0);
40024036 await expect.poll(() => page.locator("#objectVectorStudioV2ShapeGeometryDetails .object-vector-studio-v2__polygon-point-field").evaluateAll((rows) => rows.map((row) => row.querySelectorAll("input[type='checkbox']").length))).toEqual([1, 1, 1, 1]);
4037+ const polygonPointRowLayoutState = await page.locator("#objectVectorStudioV2ShapeGeometryDetails .object-vector-studio-v2__polygon-point-field").first().evaluate((row) => {
4038+ const actions = row.querySelector(".object-vector-studio-v2__polygon-point-actions");
4039+ return {
4040+ actionCellLast: row.lastElementChild === actions,
4041+ actionJustify: getComputedStyle(actions).justifyContent,
4042+ columnCount: getComputedStyle(row).gridTemplateColumns.split(" ").length,
4043+ deleteAfterRound: actions?.lastElementChild?.matches("[data-polygon-point-delete='true']") === true,
4044+ roundCheckboxes: actions?.querySelectorAll("[data-polygon-point-round='true']").length || 0
4045+ };
4046+ });
4047+ expect(polygonPointRowLayoutState).toEqual({
4048+ actionCellLast: true,
4049+ actionJustify: "flex-end",
4050+ columnCount: 4,
4051+ deleteAfterRound: true,
4052+ roundCheckboxes: 1
4053+ });
40034054 await page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-point-round='true'][data-polygon-point-index='1']").check();
40044055 await expect(page.locator("#statusLog")).toHaveValue(/OK Updated point 2 rounding to round for shape row 0\./);
40054056 await expect(page.locator("#objectVectorStudioV2ShapeGeometryDetails .object-vector-studio-v2__polygon-point-field")).toHaveCount(4);
0 commit comments