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

Slightly corrected and enabled sidebar resizing test #190

Open
wants to merge 4 commits into
base: v1.x/master
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions tests/FVTTests/DatasetTree/testResizingOfDatasetTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@ describe('MVS explorer page load', function () {
}
});

describe.skip('Sidebar resizing', () => {
describe('Sidebar resizing', () => {
before('Initialise', async () => {
await loadPage(driver, BASE_URL_WITH_PATH);
await driver.wait(until.elementLocated(By.id('refresh-icon')));
await driver.wait(until.elementLocated(By.id('collapse-button')));
await driver.manage().window().setRect({ width: 1600, height: 800 });
await resizeSidebar(300);
})
it('Should be able to resize sidebar component (explorer-sidebar)', async () => {
await resizeSidebar(1000);
expect(parseInt(await getSidebarCSSValue('width'))).to.equal(992);
await resizeSidebar(500);
expect(parseInt(await getSidebarCSSValue('width'))).to.be.above(300);
});
it('Should not be able to make sidebar component too small (explorer-sidebar)', async () => {
await resizeSidebar(100);
expect(parseInt(await getSidebarCSSValue('width'))).to.be.below(300);
expect(parseInt(await getSidebarCSSValue('width'))).to.be.above(250);
});
});
Expand All @@ -65,6 +67,7 @@ describe('MVS explorer page load', function () {
const resizeBar = await driver.findElement(By.id('resize-bar'));
const actions = driver.actions({async: true});
await actions.move({origin: resizeBar, y: 200}).press().move({x: x}).release().perform();
return driver.sleep(500);
}

async function getSidebarCSSValue(value: string) {
Expand Down