Skip to content

Commit a585169

Browse files
committed
update tests
1 parent 9447fbc commit a585169

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

playwright/e2e/example07.spec.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ test.describe('Example 07 - Submit Data', () => {
2121
let dialogText = '';
2222
page.on('dialog', async (alert) => {
2323
dialogText = alert.message();
24-
console.log('closing')
2524
await alert.dismiss();
2625
});
2726

@@ -44,12 +43,24 @@ test.describe('Example 07 - Submit Data', () => {
4443
await page.getByTestId('submit').click();
4544
await expect(dialogText).toBe('select1=1&select2=1&select2=2');
4645

47-
// select lazy loaded data
46+
});
47+
});
48+
49+
test('submit form with multiple select populated via lazy load', async ({
50+
page
51+
}) => {
52+
let dialogText = '';
53+
page.on('dialog', async (alert) => {
54+
dialogText = alert.message();
55+
await alert.dismiss();
56+
});
57+
58+
await page.goto('#/example07');
4859
await page.waitForTimeout(1);
60+
61+
// select lazy loaded data
4962
await page.locator('[data-test=select3].ms-parent').click();
5063
await page.getByRole('option').filter({ hasText: 'First' }).locator('span').click();
51-
await page.locator('[data-test=select3].ms-parent').click();
5264
await page.getByTestId('submit').click();
53-
await expect(dialogText).toBe('select1=1&select2=1&select2=2&select3=1');
54-
});
65+
await expect(dialogText).toBe('select1=1&select3=1');
5566
});

0 commit comments

Comments
 (0)