Skip to content

Commit

Permalink
Fix rtl test not working anymore after switch to "translate" instead …
Browse files Browse the repository at this point in the history
…of "left"
  • Loading branch information
Adrien Denat committed Jul 14, 2018
1 parent b52e5d5 commit 25777ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/simplebar/test/simplebar.test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Load', () => {
const el = await expect(page).toMatchElement('[data-simplebar-direction="rtl"]');
const scrollbarEl = await expect(el).toMatchElement('.simplebar-track.horizontal .simplebar-scrollbar');
const options = await page.$eval('[data-simplebar-direction="rtl"]', el => el.SimpleBar.options);
const left = await page.evaluate(el => el.offsetLeft, scrollbarEl);
const transformStyle = await page.evaluate(el => el.style.transform, scrollbarEl);

// const styles = await scrollbarEl.getProperty('style');
// const left = await styles.getProperty('left');
Expand All @@ -38,6 +38,6 @@ describe('Load', () => {
const scrollbarElBoundingBox = await scrollbarEl.boundingBox();

expect(options.direction).toEqual('rtl');
expect(elBoundingBox.width - scrollbarElBoundingBox.width).toEqual(left);
expect(transformStyle).toEqual(`translate3d(${ elBoundingBox.width - scrollbarElBoundingBox.width}px, 0px, 0px)`);
});
});

0 comments on commit 25777ae

Please sign in to comment.