generated from UCLALibrary/nuxt3-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: APPS-2864 Write E2E tests for EventDetail Page template (#29)
* add comments of the types of tests to include * linting * add cypress tests * linting * update component library * update the cypress config and the tests * add context * add context * update component library & design tokens * linting * update * x * add tests * add wait time * linting * comment out timewait * update calendar-dropdown tes * delete .only * delete wait time * re-add the named screen shot * before fix * update data * linting * update snapshot * linting * fix: unprocessable entity error and cypress tests refactor for performance and what we tests --------- Co-authored-by: pghorpade <[email protected]>
- Loading branch information
1 parent
9481a65
commit 1371a86
Showing
8 changed files
with
151 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/workflows/setup-workspace | ||
- name: Set deployment date | ||
id: set-deploy-date | ||
run: echo "DEPLOY_DATE=$(date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV | ||
- name: Cache built static site | ||
uses: actions/cache@v3 | ||
id: cache-nuxt3 | ||
|
@@ -79,7 +82,10 @@ jobs: | |
uses: nwtgck/[email protected] # | ||
with: | ||
production-deploy: false | ||
deploy-message: https://github.com/UCLALibrary/ftva-website-nuxt/pull/${{ github.event.pull_request.number }} | ||
deploy-message: | | ||
Deploy preview for PR #${{ github.event.pull_request.number }}: Date: ${{ env.DEPLOY_DATE }} | ||
Commit ${{ github.event.pull_request.head.sha }} - https://github.com/UCLALibrary/library-website-nuxt/commit/${{ github.event.pull_request.head.sha }} | ||
Pull Request: https://github.com/UCLALibrary/library-website-nuxt/pull/${{ github.event.pull_request.number }} | ||
alias: deploy-preview-${{ github.event.pull_request.number }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
overwrites-pull-request-comment: true | ||
|
@@ -109,11 +115,11 @@ jobs: | |
uses: nwtgck/actions-netlify@v2 # | ||
with: | ||
production-deploy: true | ||
deploy-message: https://github.com/UCLALibrary/ftva-website-nuxt/commit/${{ github.sha }} | ||
deploy-message: "Deploy to test on merge to main Date: ${{ env.DEPLOY_DATE }} for commit ${{ github.sha }}: https://github.com/UCLALibrary/library-website-nuxt/commit/${{ github.sha }}" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
publish-dir: .output/public | ||
fails-without-credentials: true | ||
github-deployment-environment: production | ||
github-deployment-environment: testing | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_TEST_FTVA_SITE_ID }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,71 @@ | ||
describe('Event Detail page', () => { | ||
it('Visit a event Detail Page', () => { | ||
cy.visit('/events/la-région-centrale-03-08-24') | ||
Cypress.on('uncaught:exception', () => { return false }) | ||
|
||
cy.get('h3.title-no-link').should('contain', 'TEST - La Région Centrale') | ||
describe('Event Detail page', () => { | ||
// context('breadcrumb', () => { | ||
// // NavBreadcrumb | ||
// it('has a breadcrumb nav with the correct title', () => { | ||
// cy.wait(1000) | ||
// cy.getByData('breadcrumb').contains('TEST - La Région Centrale') | ||
// }) | ||
// }) | ||
|
||
it('Visit the Event Detail Page', () => { | ||
// CarouselImages | ||
cy.visit('/events/la-région-centrale-03-08-24') | ||
cy.getByData('image-carousel').should('exist') | ||
cy.getByData('text-block').contains('TEST - La Région Centrale Screening') | ||
cy.getByData('text-block').should('be.visible') | ||
cy.getByData('event-description').should('be.visible') | ||
cy.getByData('acknowledgements').should('be.visible') | ||
cy.getByData('screening-details').should('be.visible') | ||
cy.get('.block-event-detail.ftva').scrollIntoView() | ||
cy.get('.block-event-detail.ftva').should('be.visible') | ||
cy.getByData('calendar-dropdown').should('exist') | ||
cy.getByData('ticket-info').should('be.visible') | ||
cy.getByData('event-series').should('be.visible') | ||
cy.percySnapshot('eventdetailpage', { widths: [768, 992, 1200] }) | ||
|
||
// it('clicks the arrow to see the next image', () => { | ||
// cy.getByData('screening-details').contains('Trailer with Cover image') | ||
// }) | ||
}) | ||
// modal exists | ||
// two images | ||
// creditText is visible .contains('Movie Database') | ||
// click on arrow and it moves to next image | ||
// cy.getByData("ticket-info").find("a").contains("Plan Your Visit").click() | ||
}) | ||
|
||
// Potential TODOs and test ideas | ||
// https://docs.cypress.io/guides/end-to-end-testing/writing-your-first-end-to-end-test | ||
// it.only('allows users to subscribe to the email list', () => { | ||
// cy.getByData('email-input').type('[email protected]') | ||
// cy.getByData('submit-button').click() | ||
// cy.getByData('success-message').should('exist').contains('[email protected]') | ||
// }) | ||
|
||
// UI Elements: Test visibility and functionality of important UI elements (e.g., buttons, links, modals) | ||
|
||
// Verify that data is displayed correctly, especially dynamic data fetched from APIs | ||
|
||
// Event Information Display: Ensure that all event details (title, description, date, time, location) are displayed correctly | ||
|
||
// Add to Calendar: Verify that the "Add to Calendar" button works as expected | ||
|
||
// Responsive Design: Check that the page renders correctly on different screen sizes | ||
|
||
// Navigation: Ensure that navigation to and from the event detail page works smoothly | ||
|
||
// --------- | ||
|
||
// UI Elements: Test visibility and functionality of important UI elements (e.g., buttons, links, modals) | ||
|
||
// Verify that data is displayed correctly, especially dynamic data fetched from APIs | ||
|
||
// Event Information Display: Ensure that all event details (title, description, date, time, location) are displayed correctly | ||
|
||
// Add to Calendar: Verify that the "Add to Calendar" button works as expected | ||
|
||
// Responsive Design: Check that the page renders correctly on different screen sizes | ||
|
||
// Navigation: Ensure that navigation to and from the event detail page works smoothly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1371a86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://test-ftva.library.ucla.edu as production
🚀 Deployed on https://66d21db4b153683a5737f8f3--test-ftva.netlify.app