Use BiDi protocol for Chrome tests

This commit is contained in:
Calixte Denizet 2024-04-17 21:10:23 +02:00
parent 2a125bd0f0
commit 5bfe759574
2 changed files with 8 additions and 10 deletions

View file

@ -2273,6 +2273,7 @@ describe("FreeText Editor", () => {
rect = await getRect(page, getEditorSelector(0)); rect = await getRect(page, getEditorSelector(0));
// Create a new editor.
await page.mouse.click( await page.mouse.click(
rect.x + 5 * rect.width, rect.x + 5 * rect.width,
rect.y + 5 * rect.height rect.y + 5 * rect.height
@ -2288,11 +2289,12 @@ describe("FreeText Editor", () => {
`${getEditorSelector(1)} .overlay.enabled` `${getEditorSelector(1)} .overlay.enabled`
); );
rect = await getRect(page, getEditorSelector(0)); // Select the second editor.
rect = await getRect(page, getEditorSelector(1));
await page.mouse.click( await page.mouse.click(
rect.x + 5 * rect.width, rect.x + 0.5 * rect.width,
rect.y + 5 * rect.height rect.y + 0.5 * rect.height
); );
await waitForSelectedEditor(page, getEditorSelector(1)); await waitForSelectedEditor(page, getEditorSelector(1));

View file

@ -883,12 +883,12 @@ async function startBrowser({
}) { }) {
const options = { const options = {
product: browserName, product: browserName,
protocol: "cdp", protocol: "webDriverBiDi",
dumpio: true,
headless, headless,
dumpio: true,
defaultViewport: null, defaultViewport: null,
ignoreDefaultArgs: ["--disable-extensions"], ignoreDefaultArgs: ["--disable-extensions"],
// The timeout for individual protocol (CDP) calls should always be lower // The timeout for individual protocol (BiDi) calls should always be lower
// than the Jasmine timeout. This way protocol errors are always raised in // than the Jasmine timeout. This way protocol errors are always raised in
// the context of the tests that actually triggered them and don't leak // the context of the tests that actually triggered them and don't leak
// through to other tests (causing unrelated failures or tracebacks). The // through to other tests (causing unrelated failures or tracebacks). The
@ -911,10 +911,6 @@ async function startBrowser({
} }
if (browserName === "firefox") { if (browserName === "firefox") {
// Run tests with the WebDriver BiDi protocol enabled only for Firefox for
// now given that for Chrome further fixes are needed first.
options.protocol = "webDriverBiDi";
options.extraPrefsFirefox = { options.extraPrefsFirefox = {
// Disable system addon updates. // Disable system addon updates.
"extensions.systemAddon.update.enabled": false, "extensions.systemAddon.update.enabled": false,