Skip to content

Commit 6610116

Browse files
committed
fix(tests): adjust tbodies/tr tests, better description
1 parent 6d77586 commit 6610116

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

test/vr-integration.instance-changed.spec.ts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
5858
// validates everything is renderred correctly: number of rows, first index, bot buffer height
5959
// 3. shallow clones existing array, reverses then assign to current view model
6060
// validates everything is renderred correctly: number of rows, first index, bot buffer height
61-
it('renders with correct amount of rows', async () => {
61+
it('renders with 100 items', async () => {
6262
const { virtualRepeat, viewModel } = await bootstrapComponent({ items: items });
6363

6464
const table = (component['host'] as HTMLElement).querySelector('table');
@@ -107,7 +107,8 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
107107
// 3. shallow clones existing array, reverses and slice from 0 to 30 then assign to current view model
108108
// validates everything is renderred correctly: number of rows, first index, bot buffer height
109109
it([
110-
'renders with reducing size collection',
110+
'renders with 100 items',
111+
' -- reduces to 30',
111112
' -- greater than (repeat._viewsLength)',
112113
].join('\n\t'), async () => {
113114
const { virtualRepeat, viewModel } = await bootstrapComponent({ items: items });
@@ -164,7 +165,8 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
164165
// 3. shallow clones existing array, reverses and slice from 0 to 30 then assign to current view model
165166
// validates everything is renderred correctly: number of rows, first index, bot buffer height
166167
it([
167-
'renders with reducing size collection',
168+
'renders with 100 items',
169+
' -- reduces to 16',
168170
' -- lesser than (repeat._viewsLength)',
169171
' -- greater than (repeat.elementsInView)'
170172
].join('\n\t'), async () => {
@@ -222,7 +224,8 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
222224
// 3. shallow clones existing array, reverses and slice from 0 to 30 then assign to current view model
223225
// validates everything is renderred correctly: number of rows, first index, bot buffer height
224226
it([
225-
'renders with reducing size collection',
227+
'renders with 100 items',
228+
' -- reduces to 8',
226229
' -- lesser than (repeat.elementsInView)',
227230
].join('\n\t'), async () => {
228231
const { virtualRepeat, viewModel } = await bootstrapComponent({ items: items });
@@ -276,7 +279,7 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
276279
});
277280
});
278281

279-
fdescribe('<tbody virtual-repeat.for>', () => {
282+
describe('<tbody virtual-repeat.for>', () => {
280283
beforeEach(() => {
281284
view =
282285
`<div style="height: 500px; overflow-y: auto">
@@ -290,12 +293,6 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
290293
</div>`;
291294
});
292295

293-
// In this test, it bootstraps a stage with 100 items
294-
// 1. validates everythng is renderred correctly: number of rows, first index, bot buffer height
295-
// 2. scrolls to bottom
296-
// validates everything is renderred correctly: number of rows, first index, bot buffer height
297-
// 3. shallow clones existing array, reverses then assign to current view model
298-
// validates everything is renderred correctly: number of rows, first index, bot buffer height
299296
it('renders with 100 items', async () => {
300297
const { virtualRepeat, viewModel } = await bootstrapComponent({ items: items });
301298

@@ -340,12 +337,6 @@ describe('VirtualRepeat Integration - Instance Changed', () => {
340337
expect(virtualRepeat._bottomBufferHeight).toBe(0);
341338
});
342339

343-
// In this test, it bootstraps a stage with 100 items
344-
// 1. validates everythng is renderred correctly: number of rows, first index, bot buffer height
345-
// 2. scrolls to bottom
346-
// validates everything is renderred correctly: number of rows, first index, bot buffer height
347-
// 3. shallow clones existing array, reverses and slice from 0 to 30 then assign to current view model
348-
// validates everything is renderred correctly: number of rows, first index, bot buffer height
349340
it([
350341
'renders with 100 items',
351342
' -- reduces to 30',

0 commit comments

Comments
 (0)