VulpesOS/gaia/tests/jsmarionette/client/marionette-client/test/integration/client-test.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

29 lines
771 B
JavaScript
Executable file

/* global marionette, setup */
'use strict';
var querystring = require('querystring');
suite('client methods', function() {
var client = marionette.client();
setup(function() {
client.goUrl('data:text/html,' + querystring.escape(
'<div id="host"></div>'));
client.executeScript(function() {
var host = document.getElementById('host');
var root = host.createShadowRoot();
var button = document.createElement('button');
button.id = 'button';
button.textContent = 'Foo';
root.appendChild(button);
});
});
test('#switchToShadowRoot', function() {
var host = client.findElement('#host');
client.switchToShadowRoot(host);
var button = client.findElement('#button');
button.click();
});
});