Skip to content

Commit f03427b

Browse files
committed
#7293 ticket md file update, imports / setup fix
1 parent ce0b439 commit f03427b

3 files changed

Lines changed: 32 additions & 32 deletions

File tree

.github/ISSUE/epic-enhance-workflow-with-mandatory-unit-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The primary goal is to prevent regressions, especially in the complex core modul
9494
- **To Do:** ticket-convert-state-provider-test.md
9595
- **To Do:** ticket-convert-state-providernesteddataconfigs-test.md
9696
- **To Do:** ticket-convert-vdom-advanced-test.md
97-
- **To Do:** ticket-convert-vdom-layout-cube-test.md
97+
- **Done:** ticket-convert-vdom-layout-cube-test.md
9898
- **To Do:** ticket-convert-vdom-table-container-test.md
9999
- **To Do:** ticket-convert-vdom-vdomasymmetricupdates-test.md
100100
- **To Do:** ticket-convert-vdom-vdomrealworldupdates-test.md

.github/ISSUE/ticket-convert-vdom-layout-cube-test.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
GH ticket id: #7293
44

5-
**Assignee:**
6-
**Status:** To Do
5+
**Assignee:** kart-u
6+
**Status:** Done
77

88
**Parent Epic:** epic-enhance-workflow-with-mandatory-unit-testing.md
99

test/playwright/unit/vdom/layout/Cube.spec.mjs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
import { test, expect } from '@playwright/test';
2-
import VdomHelper from '../../../../../src/vdom/Helper.mjs';
3-
import Neo from '../../../../../src/Neo.mjs';
4-
import * as core from '../../../../../src/core/_export.mjs'; // CRITICAL: Required for Neo.mjs environment setup in Node.js
5-
import StringFromVnode from '../../../../../src/vdom/util/StringFromVnode.mjs';
6-
7-
// tests are designed for this rendering mode
8-
// Neo.config.useDomApiRenderer = false;
1+
import { setup } from '../../../setup.mjs';
92

10-
let oldVdom, vdom;
3+
// Call setup with the specific configuration for this test file
4+
setup({
5+
neoConfig: {
6+
useDomApiRenderer: false
7+
}
8+
});
119

10+
import {test, expect} from '@playwright/test';
11+
import Neo from '../../../../../src/Neo.mjs';
12+
import * as core from '../../../../../src/core/_export.mjs';
13+
import StringFromVnode from '../../../../../src/vdom/util/StringFromVnode.mjs';
14+
import VdomHelper from '../../../../../src/vdom/Helper.mjs';
15+
16+
/**
17+
* @summary Verifies the VdomHelper's ability to handle wrapping and unwrapping of container items for cube layouts.
18+
* This suite ensures that when items are dynamically wrapped or unwrapped in nested divs, the VdomHelper
19+
* generates the correct sequence of deltas (insert, move, remove) to reflect the structural changes,
20+
* including attribute modifications on the moved items.
21+
*/
1222
test.describe('vdom/layout/Cube', () => {
13-
/**
14-
* @summary Verifies the VdomHelper's ability to handle wrapping and unwrapping of container items for cube layouts.
15-
* This suite ensures that when items are dynamically wrapped or unwrapped in nested divs, the VdomHelper
16-
* generates the correct sequence of deltas (insert, move, remove) to reflect the structural changes,
17-
* including attribute modifications on the moved items.
18-
*/
19-
test.beforeEach(() => {
20-
Neo.config.useDomApiRenderer = false;
21-
});
22-
2323
test('Wrap Container Items', () => {
24-
oldVdom =
24+
const oldVdom =
2525
{id: 'neo-container-1', cn: [
2626
{id: 'neo-component-1'},
2727
{id: 'neo-component-2'},
@@ -33,7 +33,7 @@ test.describe('vdom/layout/Cube', () => {
3333

3434
let oldVnode = VdomHelper.create({vdom: oldVdom}).vnode;
3535

36-
vdom =
36+
const vdom =
3737
{id: 'neo-container-1', cn: [
3838
{id: 'neo-vnode-1', cn: [
3939
{id: 'neo-vnode-2', cn: [
@@ -47,7 +47,7 @@ test.describe('vdom/layout/Cube', () => {
4747
]}
4848
]};
4949

50-
let {deltas, vnode} = VdomHelper.update({vdom, vnode: oldVnode});
50+
const {deltas, vnode} = VdomHelper.update({vdom, vnode: oldVnode});
5151

5252
expect(deltas.length).toBe(7);
5353

@@ -68,7 +68,7 @@ test.describe('vdom/layout/Cube', () => {
6868
});
6969

7070
test('Unwrap Container Items', () => {
71-
oldVdom =
71+
const oldVdom =
7272
{id: 'neo-container-1', cn: [
7373
{id: 'neo-vnode-1', cn: [
7474
{id: 'neo-vnode-2', cn: [
@@ -84,7 +84,7 @@ test.describe('vdom/layout/Cube', () => {
8484

8585
let oldVnode = VdomHelper.create({vdom: oldVdom}).vnode;
8686

87-
vdom =
87+
const vdom =
8888
{id: 'neo-container-1', cn: [
8989
{id: 'neo-component-1'},
9090
{id: 'neo-component-2'},
@@ -94,7 +94,7 @@ test.describe('vdom/layout/Cube', () => {
9494
{id: 'neo-component-6'}
9595
]};
9696

97-
let {deltas, vnode} = VdomHelper.update({vdom, vnode: oldVnode});
97+
const {deltas, vnode} = VdomHelper.update({vdom, vnode: oldVnode});
9898

9999
expect(deltas.length).toBe(7);
100100

@@ -110,7 +110,7 @@ test.describe('vdom/layout/Cube', () => {
110110
});
111111

112112
test('Wrap Container Items & Change Item Attributes', () => {
113-
oldVdom =
113+
const oldVdom =
114114
{id: 'neo-container-1', cn: [
115115
{id: 'neo-component-1'},
116116
{id: 'neo-component-2'},
@@ -122,7 +122,7 @@ test.describe('vdom/layout/Cube', () => {
122122

123123
let oldVnode = VdomHelper.create({vdom: oldVdom}).vnode;
124124

125-
vdom =
125+
const vdom =
126126
{id: 'neo-container-1', cn: [
127127
{id: 'neo-vnode-1', cn: [
128128
{id: 'neo-vnode-2', cn: [
@@ -159,7 +159,7 @@ test.describe('vdom/layout/Cube', () => {
159159
});
160160

161161
test('Unwrap Container Items & Change Item Attributes', () => {
162-
oldVdom =
162+
const oldVdom =
163163
{id: 'neo-container-1', cn: [
164164
{id: 'neo-vnode-1', cn: [
165165
{id: 'neo-vnode-2', cn: [
@@ -175,7 +175,7 @@ test.describe('vdom/layout/Cube', () => {
175175

176176
let oldVnode = VdomHelper.create({vdom: oldVdom}).vnode;
177177

178-
vdom =
178+
const vdom =
179179
{id: 'neo-container-1', cn: [
180180
{id: 'neo-component-1'},
181181
{id: 'neo-component-2'},

0 commit comments

Comments
 (0)