Skip to content

Commit 4351603

Browse files
committed
release version canary
1 parent 1b22759 commit 4351603

File tree

2 files changed

+51
-51
lines changed

2 files changed

+51
-51
lines changed

examples/src/pages/tests/table/master-detail/use-master-row-info.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export default test.describe.parallel('Master-detail', () => {
77
}) => {
88
await page.waitForInfinite();
99

10+
await page.waitForTimeout(100);
11+
1012
const firstChildColumn = tableModel.withColumn('firstNameChildColumn');
1113
expect(await firstChildColumn.getHeader()).toBe('firstNameChildColumn 13');
1214

examples/src/pages/tests/table/props/group-by/server-side-group-batching-should-load-expanded-rows.spec.ts

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,53 @@ import { Request } from '@playwright/test';
22
import { test, expect } from '@testing';
33
import { getCellText } from '../../../testUtils';
44

5-
export default test.describe.parallel(
6-
'Server-side grouping with lazy load and batching',
7-
() => {
8-
test('should load expanded rows', async ({ page }) => {
9-
page.load();
10-
const urls: string[] = [];
11-
12-
const condition = (request: Request) => {
13-
const ok =
14-
request.url().includes('developers10') && request.method() === 'GET';
15-
16-
if (ok) {
17-
urls.push(request.url());
18-
}
19-
20-
return ok;
21-
};
22-
23-
// wait for initial call
24-
await page.waitForRequest(condition);
25-
// wait for france to be requested
26-
await page.waitForRequest(condition);
27-
28-
const queryStrings = urls.map((url) => url.slice(url.indexOf('?')));
29-
30-
const paramsForRequests = queryStrings.map((query) => {
31-
const searchParams = new URLSearchParams(query);
32-
33-
const obj: any = {};
34-
for (const [key, value] of searchParams) {
35-
obj[key] = JSON.parse(value);
36-
}
37-
return obj;
38-
});
39-
40-
// expect a request was made for France
41-
expect(paramsForRequests[1].groupKeys).toEqual(['France']);
42-
43-
const firstFrance = await getCellText(
44-
{ colId: 'country', rowIndex: 1 },
45-
{ page },
46-
);
47-
const secondFrance = await getCellText(
48-
{ colId: 'country', rowIndex: 2 },
49-
{ page },
50-
);
51-
52-
expect(firstFrance).toBe('France');
53-
expect(secondFrance).toBe('France');
5+
export default test.describe
6+
.parallel('Server-side grouping with lazy load and batching', () => {
7+
test('should load expanded rows', async ({ page }) => {
8+
page.load();
9+
const urls: string[] = [];
10+
11+
const condition = (request: Request) => {
12+
const ok =
13+
request.url().includes('developers10') && request.method() === 'GET';
14+
15+
if (ok) {
16+
urls.push(request.url());
17+
}
18+
19+
return ok;
20+
};
21+
22+
// wait for initial call
23+
await page.waitForRequest(condition);
24+
// wait for france to be requested
25+
await page.waitForRequest(condition);
26+
27+
const queryStrings = urls.map((url) => url.slice(url.indexOf('?')));
28+
29+
const paramsForRequests = queryStrings.map((query) => {
30+
const searchParams = new URLSearchParams(query);
31+
32+
const obj: any = {};
33+
for (const [key, value] of searchParams) {
34+
obj[key] = JSON.parse(value);
35+
}
36+
return obj;
5437
});
55-
},
56-
);
38+
39+
// expect a request was made for France
40+
expect(paramsForRequests[1].groupKeys).toEqual(['France']);
41+
42+
const firstFrance = await getCellText(
43+
{ colId: 'country', rowIndex: 1 },
44+
{ page },
45+
);
46+
const secondFrance = await getCellText(
47+
{ colId: 'country', rowIndex: 2 },
48+
{ page },
49+
);
50+
51+
expect(firstFrance).toBe('France');
52+
expect(secondFrance).toBe('France');
53+
});
54+
});

0 commit comments

Comments
 (0)