Skip to content

Commit

Permalink
Fixed viewport test, added reference images for pretest
Browse files Browse the repository at this point in the history
  • Loading branch information
martingrossmann committed Dec 2, 2024
1 parent ed2b559 commit 36fde11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,16 @@ private void testElementIntersectsParent(boolean test) {
element.expect().bounds().intersects(parent).is(test);
}

// Window size of all tests is set to 1024x768
// Viewport size is smaller then window size
@Test
public void test_viewport() {
WebTestPage page = getPage();
page.expect().viewport().left().is(0);
page.expect().viewport().top().is(0);

page.expect().viewport().contains(page.getOpenAgainLink()).is(true);
page.expect().viewport().width().is(1024);
page.expect().viewport().height().is(768);
page.expect().viewport().width().isBetween(1000, 1024);
page.expect().viewport().height().isBetween(620, 768);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 36fde11

Please sign in to comment.