test: add missing page-title-updated event spec for webview (#34529)

This commit is contained in:
Milan Burda 2022-06-14 18:15:45 +02:00 committed by GitHub
parent 9707812d68
commit 8de5cdb426
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -554,6 +554,18 @@ describe('<webview> tag', function () {
});
});
describe('page-title-updated event', () => {
it('emits when title is set', async () => {
loadWebView(webview, {
src: `file://${fixtures}/pages/a.html`
});
const { title, explicitSet } = await waitForEvent(webview, 'page-title-updated');
expect(title).to.equal('test');
expect(explicitSet).to.be.true();
});
});
describe('page-title-set event', () => {
it('emits when title is set', async () => {
loadWebView(webview, {