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

chore(e2e): small screen fixes #6351

Merged
merged 2 commits into from
Oct 11, 2024
Merged

chore(e2e): small screen fixes #6351

merged 2 commits into from
Oct 11, 2024

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Oct 11, 2024

No description provided.

const [width, height] = await browser.execute(() => {
// in case setWindowSize() below doesn't work
window.resizeTo(window.screen.availWidth, window.screen.availHeight);
if (TEST_COMPASS_WEB) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out window.resizeTo is only working in the browser. Sometimes. Also window.screen.availWidth, window.screen.availHeight was returning nonsense in electron world so even if it did size the window with webdriverio's browser.setWindowSize() it wasn't being helpful.

So I added a new path for electron land and kept the old one for compass web.

console.log(JSON.stringify(result, null, 2));
throw err;
}
expect(result._id).to.equal('1001265');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do a deep equality check, really. The test just wants to know that the doc it imported is on screen. ie. the Documents refreshed at the end.

@lerouxb lerouxb merged commit 22677d9 into main Oct 11, 2024
26 of 27 checks passed
@lerouxb lerouxb deleted the small-screen-fixes branch October 11, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants