Skip to content

Commit

Permalink
fix discover tests for Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Apr 3, 2020
1 parent 67d3afe commit 87e7fdd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/functional/page_objects/discover_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,24 @@ export function DiscoverPageProvider({ getService, getPageObjects }: FtrProvider
public async clickHistogramBar() {
const el = await elasticChart.getCanvas();

const x = browser.isW3CEnabled ? 0 : 200;

await browser
.getActions()
.move({ x: 200, y: 20, origin: el._webElement })
.move({ x, y: 20, origin: el._webElement })
.click()
.perform();
}

public async brushHistogram() {
const el = await elasticChart.getCanvas();

const x1 = browser.isW3CEnabled ? -300 : 200;
const x2 = browser.isW3CEnabled ? -100 : 400;

await browser.dragAndDrop(
{ location: el, offset: { x: 200, y: 20 } },
{ location: el, offset: { x: 400, y: 30 } }
{ location: el, offset: { x: x1, y: 20 } },
{ location: el, offset: { x: x2, y: 30 } }
);
}

Expand Down

0 comments on commit 87e7fdd

Please sign in to comment.