Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update selenium test to support system-app #3210

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .ci/pull-request-check/selenium-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,11 @@ var allPassed = false;

// No API to retrieve extension ID. Hacks, sigh.
await driver.get("chrome://system/");
await driver.wait(until.elementLocated({id: 'btn-extensions-value'}), 60*1000);
// Chrome 89+ has the extension list expanded by default
try {
let extBtn = await driver.findElement({css: '#btn-extensions-value'});
await extBtn.click();
} catch (e) {}
let contentElem = await driver.findElement({css: '#content'});
let text = await contentElem.getText();
let extId = text.match(/([^\s]*) : Zotero Connector/)[1];
await driver.wait(until.elementLocated({tagName: 'system-app'}), 60*1000);
let systemAppElement = await driver.findElement({tagName: 'system-app'});
let logs = await driver.executeAsyncScript('arguments[0].connectedCallback().then(() => arguments[1](arguments[0].logs_))', systemAppElement);
let extensionStat = logs.find(log => log.statName === 'extensions');
let extId = extensionStat.statValue.match(/([^\s]*) : Zotero Connector/)[1];

// We got the extension ID and test URL, let's test
const translatorsToTest = await getTranslatorsToTest();
Expand Down
Loading