Skip to content

Commit 3c08546

Browse files
committed
Fix Tests
1 parent 54969cd commit 3c08546

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@crystallize/reactjs-components",
33
"license": "MIT",
4-
"version": "0.3.3",
4+
"version": "0.3.4",
55
"author": "Crystallize <[email protected]> (https://crystallize.com)",
66
"contributors": [
77
"Håkon Krogh <[email protected]>",

tests/gridcellposition.test.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test('Get a Grid and check the position', async () => {
1010
const query = {
1111
grid: {
1212
__args: {
13-
id: '62a23c5e860bd16784ae5bec',
13+
id: '626ea0599161f671155db9a9',
1414
language: 'en',
1515
},
1616
id: true,
@@ -29,22 +29,18 @@ test('Get a Grid and check the position', async () => {
2929
},
3030
};
3131
const grid = (await fetch(query)).grid;
32+
3233
expect(grid.rows[0].columns[0].layout.rowspan).toBe(1);
33-
expect(grid.rows[1].columns[0].layout.rowspan).toBe(3);
34+
expect(grid.rows[1].columns[0].layout.rowspan).toBe(1);
35+
expect(grid.rows[5].columns[0].layout.rowspan).toBe(2);
3436
const gridCells = wrapCellsInRows(grid.rows);
3537

3638
const check = ([cellRowIndex, cellColIndex], [rowIndex, colIndex]) => {
3739
expect(gridCells[cellRowIndex][cellColIndex].position.rowIndex).toBe(rowIndex);
3840
expect(gridCells[cellRowIndex][cellColIndex].position.colIndex).toBe(colIndex);
3941
};
40-
check([2, 0], [2, 1]);
41-
check([2, 1], [2, 3]);
42-
check([5, 3], [5, 3]);
43-
check([4, 2], [4, 3]);
44-
45-
check([6, 0], [6, 0]);
46-
check([6, 1], [6, 2]);
4742

48-
check([7, 0], [7, 2]);
49-
// console.log(gridCells[2]);
43+
check([1, 0], [1, 0]);
44+
check([2, 0], [2, 0]);
45+
check([6, 0], [6, 2]);
5046
});

0 commit comments

Comments
 (0)