Skip to content

Commit

Permalink
[js] Unsuppress actions_test.js for safari
Browse files Browse the repository at this point in the history
Also disable API bridge mode; it's no longer needed for the major
browsers.
  • Loading branch information
jleyba committed Jun 6, 2019
1 parent 49e0260 commit 488eecc
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions javascript/node/selenium-webdriver/test/actions_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const {Key, Origin} = require('../lib/input');
const {Browser, By, until} = require('..');

test.suite(function(env) {
test.ignore(env.browsers(Browser.SAFARI)).
describe('WebDriver.actions()', function() {
let driver;

Expand Down Expand Up @@ -58,7 +57,7 @@ test.suite(function(env) {
let box = await driver.findElement(By.id('box'));
assert.equal(await box.getAttribute('class'), '');

await driver.actions({bridge: true}).click(box).perform();
await driver.actions().click(box).perform();
assert.equal(await box.getAttribute('class'), 'green');
});

Expand All @@ -69,7 +68,7 @@ test.suite(function(env) {
const rect = await div.getRect();
assert.deepEqual(rect, {width: 500, height: 500, x: 0, y: 0});

await driver.actions({bridge: true}).click(div).perform();
await driver.actions().click(div).perform();

const clicks = await driver.executeScript('return clicks');
assert.deepEqual(clicks, [[250, 250]]);
Expand All @@ -82,7 +81,7 @@ test.suite(function(env) {
const rect = await div.getRect();
assert.deepEqual(rect, {width: 500, height: 500, x: 0, y: 0});

await driver.actions({bridge: true})
await driver.actions()
.move({x: 10, y: 10, origin: div})
.click()
.perform();
Expand All @@ -98,7 +97,7 @@ test.suite(function(env) {
let box = await driver.findElement(By.id('box'));
assert.equal(await box.getAttribute('class'), '');

await driver.actions({bridge: true}).doubleClick(box).perform();
await driver.actions().doubleClick(box).perform();
assert.equal(await box.getAttribute('class'), 'blue');
});

Expand All @@ -116,12 +115,12 @@ test.suite(function(env) {
assert.equal(await slide.getCssValue('top'), '0px');

let br = await driver.findElement(By.id('BR'));
await driver.actions({bridge: true}).dragAndDrop(slide, br).perform();
await driver.actions().dragAndDrop(slide, br).perform();
assert.equal(await slide.getCssValue('left'), '206px');
assert.equal(await slide.getCssValue('top'), '206px');

let tr = await driver.findElement(By.id('TR'));
await driver.actions({bridge: true}).dragAndDrop(slide, tr).perform();
await driver.actions().dragAndDrop(slide, tr).perform();
assert.equal(await slide.getCssValue('left'), '206px');
assert.equal(await slide.getCssValue('top'), '1px');
});
Expand All @@ -134,7 +133,7 @@ test.suite(function(env) {
assert.equal(await slide.getCssValue('left'), '0px');
assert.equal(await slide.getCssValue('top'), '0px');

await driver.actions({bridge: true})
await driver.actions()
.move({origin: slide})
.press()
.move({x: 100, y: 100, origin: Origin.POINTER})
Expand All @@ -152,7 +151,7 @@ test.suite(function(env) {

let link = await driver.findElement(By.id('link'));

await driver.actions({bridge: true}).click(link).perform();
await driver.actions().click(link).perform();
await driver.switchTo().defaultContent();
return driver.wait(until.titleIs('Submitted Successfully!'), 5000);
});
Expand All @@ -165,7 +164,7 @@ test.suite(function(env) {

await driver.executeScript('arguments[0].focus()', el);

await driver.actions({bridge: true}).sendKeys('foobar').perform();
await driver.actions().sendKeys('foobar').perform();

assert.equal(await el.getAttribute('value'), 'foobar');
});
Expand All @@ -178,7 +177,7 @@ test.suite(function(env) {

await driver.executeScript('arguments[0].focus()', el);

await driver.actions({bridge: true})
await driver.actions()
.sendKeys('fo')
.keyDown(Key.SHIFT)
.sendKeys('OB')
Expand All @@ -195,7 +194,7 @@ test.suite(function(env) {
let el = await driver.findElement(By.id('email'));
assert.equal(await el.getAttribute('value'), '');

await driver.actions({bridge: true})
await driver.actions()
.click(el)
.sendKeys('foobar')
.perform();
Expand Down

0 comments on commit 488eecc

Please sign in to comment.