Skip to content

Commit

Permalink
trickle-ice: fix default server doubleclick
Browse files Browse the repository at this point in the history
and enable e2e test
  • Loading branch information
fippo committed Apr 8, 2022
1 parent bca762b commit 861d551
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/content/peerconnection/trickle-ice/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ let candidates;
const allServersKey = 'servers';

function setDefaultServer(serversSelect) {
const o = document.createElement('option');
o.value = '{"urls":["stun:stun.l.google.com:19302"]}';
o.text = 'stun:stun.l.google.com:19302';
serversSelect.add(o);
const option = document.createElement('option');
option.value = '{"urls":["stun:stun.l.google.com:19302"]}';
option.text = 'stun:stun.l.google.com:19302';
option.ondblclick = selectServer;
serversSelect.add(option);
}

function writeServersToLocalStorage() {
Expand Down
3 changes: 1 addition & 2 deletions src/content/peerconnection/trickle-ice/js/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ describe('Trickle-Ice', () => {
await driver.wait(() => driver.executeScript(() => pc === null && candidates.length > 0), 30 * 1000); // eslint-disable-line no-undef
});

// TODO: doubleclick does not seem to work...
it.skip('loads server data', async () => {
it('loads server data on double click', async () => {
const element = await driver.findElement(webdriver.By.css('#servers>option'));
const actions = driver.actions({async: true});
await actions.doubleClick(element).perform();
Expand Down

0 comments on commit 861d551

Please sign in to comment.