mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
test: make sure page.fill
actually clears an input (#851)
This commit is contained in:
parent
1b1ed087ae
commit
a4c40fff82
@ -1132,6 +1132,13 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FF
|
||||
await page.fill('input', '').catch(e => error = e);
|
||||
expect(error.message).toContain('Cannot type text into input[type=number].');
|
||||
});
|
||||
it('should be able to clear', async({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/input/textarea.html');
|
||||
await page.fill('input', 'some value');
|
||||
expect(await page.evaluate(() => result)).toBe('some value');
|
||||
await page.fill('input', '');
|
||||
expect(await page.evaluate(() => result)).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Page.Events.Close', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user