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

Cq 4358343 #466

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
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
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
Loading