Skip to content

Commit

Permalink
Cq 4358343 (#466)
Browse files Browse the repository at this point in the history
* CQ-4358343 cypress 13.14.1
  • Loading branch information
nortoneo authored Sep 5, 2024
1 parent ea33379 commit a5915af
Show file tree
Hide file tree
Showing 5 changed files with 1,144 additions and 855 deletions.
3 changes: 1 addition & 2 deletions ui.tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM cypress/included:13.5.1
FROM cypress/included:13.14.1

ENV APP_PATH /usr/src/app
RUN apt -qqy update \
# Generic dependencies
&& apt -qqy --no-install-recommends install \
python \
curl \
build-essential

Expand Down
4 changes: 4 additions & 0 deletions ui.tests/test-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ensuring that tests will be executed and reports generated are stored in the pro

### local testing

Note: These sample tests were written for AEMCS only.
If you want to try running them against local environment, you need to set up author and publish environments
with WKND dispatcher configuration (URL rewrites) and working replication.

- Install Cypress
```shell
npm install
Expand Down
6 changes: 6 additions & 0 deletions ui.tests/test-module/cypress/e2e/publicsite.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ describe('validate the Wknd public site', () => {
// note: cy.origin creates a new context, hence we need to pass the test page as a new argument.
// also exception handling is isolated to the new context
cy.origin(Cypress.env('AEM_PUBLISH_URL'), () => {
cy.on('uncaught:exception', (err) => {
if (err.message.includes('Blocked a frame with origin')) {
// handle a specific case where contexthub unload makes the test fail when navigating away from the page in the publish instance
return false
}
})
cy.visit('/')
cy.get('.cmp-search__field').type('Climbing')
cy.get('.cmp-search__results a').should('have.length.least', 1)
Expand Down
Loading

0 comments on commit a5915af

Please sign in to comment.