From 0520ec71e7122c723dc9a64e748664560801786d Mon Sep 17 00:00:00 2001 From: Jakub Izbicki Date: Tue, 9 Oct 2018 15:48:20 +0200 Subject: [PATCH 1/6] Increase screenshot max height. --- .../aet/job/common/modifiers/resolution/ResolutionModifier.java | 2 +- .../job/common/modifiers/resolution/ResolutionModifierTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/jobs/src/main/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifier.java b/core/jobs/src/main/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifier.java index ddb6352a1..6d15442be 100644 --- a/core/jobs/src/main/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifier.java +++ b/core/jobs/src/main/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifier.java @@ -41,7 +41,7 @@ public class ResolutionModifier implements CollectorJob { private static final String JAVASCRIPT_GET_BODY_HEIGHT = "return document.body.scrollHeight"; - private static final int MAX_SIZE = 15000; + private static final int MAX_SIZE = 35000; private static final int INITIAL_HEIGHT = 300; diff --git a/core/jobs/src/test/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifierTest.java b/core/jobs/src/test/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifierTest.java index 98b796f17..931e0aa87 100644 --- a/core/jobs/src/test/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifierTest.java +++ b/core/jobs/src/test/java/com/cognifide/aet/job/common/modifiers/resolution/ResolutionModifierTest.java @@ -53,7 +53,7 @@ public class ResolutionModifierTest { private static final int CUSTOM_HEIGHT = 600; - private static final int BROWSER_HEIGHT_LIMIT = 15000; + private static final int BROWSER_HEIGHT_LIMIT = 35000; @Mock private RemoteWebDriver webDriver; From f9168291d6cc8dbb25c08e921d39e9c8b7bcebf2 Mon Sep 17 00:00:00 2001 From: Jakub Izbicki Date: Thu, 11 Oct 2018 11:13:32 +0200 Subject: [PATCH 2/6] Add tests for long page screenshots --- .../sanity/comparators/layout/long_page.jsp | 27 +++++++++++++++ .../sanity/functional/HomePageTilesTest.java | 8 ++--- .../test/resources/features/filtering.feature | 4 +-- .../test-suite/partials/layout.xml | 33 +++++++++++++++++++ 4 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 integration-tests/sample-site/src/main/webapp/sanity/comparators/layout/long_page.jsp diff --git a/integration-tests/sample-site/src/main/webapp/sanity/comparators/layout/long_page.jsp b/integration-tests/sample-site/src/main/webapp/sanity/comparators/layout/long_page.jsp new file mode 100644 index 000000000..1167b6227 --- /dev/null +++ b/integration-tests/sample-site/src/main/webapp/sanity/comparators/layout/long_page.jsp @@ -0,0 +1,27 @@ +<%-- + + AET + + Copyright (C) 2013 Cognifide Limited + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ include file="/includes/header.jsp" %> + + + +<%@ include file="dynamic_content.jsp" %> diff --git a/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java b/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java index c0075b151..92c56c999 100644 --- a/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java +++ b/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java @@ -29,15 +29,15 @@ @Modules(GuiceModule.class) public class HomePageTilesTest { - private static final int TESTS = 136; + private static final int TESTS = 138; - private static final int EXPECTED_TESTS_SUCCESS = 77; + private static final int EXPECTED_TESTS_SUCCESS = 78; - private static final int EXPECTED_TESTS_CONDITIONALLY_PASSED = 9; + private static final int EXPECTED_TESTS_CONDITIONALLY_PASSED = 10; private static final int EXPECTED_TESTS_WARN = 5; - private static final int EXPECTED_TESTS_FAIL = 54; + private static final int EXPECTED_TESTS_FAIL = 55; @Inject private ReportHomePage page; diff --git a/integration-tests/sanity-functional/src/test/resources/features/filtering.feature b/integration-tests/sanity-functional/src/test/resources/features/filtering.feature index 1aeb81503..4971783ea 100644 --- a/integration-tests/sanity-functional/src/test/resources/features/filtering.feature +++ b/integration-tests/sanity-functional/src/test/resources/features/filtering.feature @@ -37,8 +37,8 @@ Feature: Tests Results Filtering Scenario: Filtering Tests Results: layout Given I have opened sample tests report page When I search for tests containing "layout" - Then There are 35 tiles visible - And Statistics text contains "35 ( 15 / 0 / 20 (9) / 0 )" + Then There are 37 tiles visible + And Statistics text contains "37 ( 16 / 0 / 21 (10) / 0 )" Scenario: Filtering Tests Results: jserrors Given I have opened sample tests report page diff --git a/integration-tests/test-suite/partials/layout.xml b/integration-tests/test-suite/partials/layout.xml index 72f74a50b..167f7af44 100644 --- a/integration-tests/test-suite/partials/layout.xml +++ b/integration-tests/test-suite/partials/layout.xml @@ -474,5 +474,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 30cb4ce86ee12589ea62d7229dbdeafd4248bcd8 Mon Sep 17 00:00:00 2001 From: Jakub Izbicki Date: Thu, 11 Oct 2018 13:21:55 +0200 Subject: [PATCH 3/6] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f132b6c0f..116b40da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to AET will be documented in this file. - [PR-380](https://github.com/Cognifide/aet/pull/380) Exclude elements position calculated with partial screenshot offset ([#379](https://github.com/Cognifide/aet/issues/379)) - [PR-378](https://github.com/Cognifide/aet/pull/378) OSGI-configurable Chrome options. +- [PR-enter pr no. here](https://github.com/Cognifide/aet/pull/prNumber) Set max allowed page screenshot height to 35k pixels. ## Version 3.0.0 From 677244d2ec99e00edc31c848ff0f381eea76aa2e Mon Sep 17 00:00:00 2001 From: Jakub Izbicki Date: Fri, 12 Oct 2018 09:48:47 +0200 Subject: [PATCH 4/6] Fix review issues --- CHANGELOG.md | 2 +- documentation/src/main/wiki/ResolutionModifier.md | 4 ++-- integration-tests/test-suite/partials/layout.xml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 116b40da5..590631065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ All notable changes to AET will be documented in this file. - [PR-380](https://github.com/Cognifide/aet/pull/380) Exclude elements position calculated with partial screenshot offset ([#379](https://github.com/Cognifide/aet/issues/379)) - [PR-378](https://github.com/Cognifide/aet/pull/378) OSGI-configurable Chrome options. -- [PR-enter pr no. here](https://github.com/Cognifide/aet/pull/prNumber) Set max allowed page screenshot height to 35k pixels. +- [PR-387](https://github.com/Cognifide/aet/pull/387) Set max allowed page screenshot height to 35k pixels. ## Version 3.0.0 diff --git a/documentation/src/main/wiki/ResolutionModifier.md b/documentation/src/main/wiki/ResolutionModifier.md index 53bf70e81..239af1e28 100644 --- a/documentation/src/main/wiki/ResolutionModifier.md +++ b/documentation/src/main/wiki/ResolutionModifier.md @@ -12,8 +12,8 @@ Module name: **resolution** | Parameter | Value | Description | Mandatory | | --------- | ----- | ----------- | --------- | -| `width` | int (1 to 15000) | Window width | yes | -| `height` | int (1 to 15000) | Window height | no | +| `width` | int (1 to 35000) | Window width | yes | +| `height` | int (1 to 35000) | Window height | no | | Note | |:------ | diff --git a/integration-tests/test-suite/partials/layout.xml b/integration-tests/test-suite/partials/layout.xml index 167f7af44..3a29ba499 100644 --- a/integration-tests/test-suite/partials/layout.xml +++ b/integration-tests/test-suite/partials/layout.xml @@ -479,6 +479,8 @@ + @@ -495,6 +497,8 @@ + From f07c4a08aae22683be2c475e723e27cf739e2ac4 Mon Sep 17 00:00:00 2001 From: Jakub Izbicki Date: Mon, 15 Oct 2018 11:27:20 +0200 Subject: [PATCH 5/6] Remove dynamic content partial to take screenshot of full long page --- integration-tests/test-suite/partials/layout.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/test-suite/partials/layout.xml b/integration-tests/test-suite/partials/layout.xml index 3a29ba499..3d3734bf2 100644 --- a/integration-tests/test-suite/partials/layout.xml +++ b/integration-tests/test-suite/partials/layout.xml @@ -483,7 +483,7 @@ (https://github.com/Cognifide/aet/issues/357)--> - + From 9e9e2b9f1311384380e2871ac444ba0c8308b4ed Mon Sep 17 00:00:00 2001 From: Jakub Izbicki Date: Mon, 15 Oct 2018 12:08:51 +0200 Subject: [PATCH 6/6] Move changelog notes under Unreleased section --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 590631065..97e0fcb8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,13 +9,13 @@ All notable changes to AET will be documented in this file. ## Unreleased **List of changes that are finished but not yet released in any final version.** +- [PR-387](https://github.com/Cognifide/aet/pull/387) Set max allowed page screenshot height to 35k pixels. ## Version 3.0.1 - [PR-380](https://github.com/Cognifide/aet/pull/380) Exclude elements position calculated with partial screenshot offset ([#379](https://github.com/Cognifide/aet/issues/379)) - [PR-378](https://github.com/Cognifide/aet/pull/378) OSGI-configurable Chrome options. -- [PR-387](https://github.com/Cognifide/aet/pull/387) Set max allowed page screenshot height to 35k pixels. ## Version 3.0.0