-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDPA-2747] Event page e2e test (#429)
* [SDPA-2747] Add Event Page e2e test. * [SDPA-2747] Update test script to read as per ticket. * [SDPA-2747] Fix script bugs. * [SDPA-2747] Fix CR issues.
- Loading branch information
1 parent
95cf0c7
commit f4ee9fc
Showing
9 changed files
with
250 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"title": "2-BE-event-1", | ||
"summary": "Tell me, O muse, of that ingenious hero who travelled far and wide after he had sacked the famous town of Troy. Many cities did he visit, and many were the nations with whose manners and customs END", | ||
"topic": "\"Education (10)\"", | ||
"siteNumber": 4, | ||
"description": "Now Neptune had gone off to the Ethiopians, who are at the world's end, and lie in two halves, the one looking West and the other East. He had gone there to accept a hecatomb of sheep and oxen, and was enjoying himself at his festival; but the other gods met in the house of Olympian Jove, and the sire of gods and men spoke first.", | ||
"bodyContent": { | ||
"body": "So now all who escaped death in battle or by shipwreck had got safely home except Ulysses, and he, though he was longing to return to his wife and country, was detained by the goddess Calypso, who had got him into a large cave and wanted to marry him. But as years went by, there came a time when the gods settled that he should go back to Ithaca; even then, however, when he was among his own people, his troubles were not yet over; nevertheless all the gods had now begun to pity him except Neptune, who still persecuted him without ceasing and would not let him get home.", | ||
"startDate": "20/05/2019", | ||
"startTime": "11:02:20am", | ||
"endDate": "13/05/2020", | ||
"endTime": "11:11:11am", | ||
"streetAddress": "45 Collins St", | ||
"suburb": "Melbourne", | ||
"state": "VIC", | ||
"postalCode": "3000", | ||
"price": "34.33", | ||
"priceTo": "89.95", | ||
"eventRequirements": "Accessible venue (84)", | ||
"bookUrl": "http://examplebook.com", | ||
"linkText": "External Link", | ||
"eventCategory": "Film and cinema (78)", | ||
"audience": "Individual (80)", | ||
"websiteUrl": "https://www.weatherzone.com.au/vic/central/healesville" | ||
}, | ||
"eventAuthor": { | ||
"fullName": "Full Name", | ||
"emailAddress": "[email protected]", | ||
"contactPhone": "12345678" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Feature: Events | ||
|
||
As a citizen I can view information for all available content on an event page | ||
Prerequisite: Events Simple Test 1-BE-event-1 | ||
|
||
# Before hook | ||
# - Logs into backend | ||
# - Creates eventpage from fixture data @pageData and saves node id as @nodeId | ||
|
||
# After hook | ||
# - Deletes node id @nodeId | ||
|
||
Scenario: Event Page loads correctly | ||
When I have navigated to the created page | ||
Then the page title should be "2-BE-event-1" | ||
And the Description should be "Now Neptune had gone off to the Ethiopians, who are at the world's end, and lie in two halves, the one looking West and the other East. He had gone there to accept a hecatomb of sheep and oxen, and was enjoying himself at his festival; but the other gods met in the house of Olympian Jove, and the sire of gods and men spoke first." | ||
And the Dates should be "20 May 2019 11:02 am - 13 May 2020 11:11 am" | ||
And the Address should be "45 Collins St, Melbourne, VIC 3000" | ||
And the Price should be "34.33 - 89.95" | ||
And the Web url should be "https://www.weatherzone.com.au/vic/central/healesville" | ||
And the Requirements should be "Accessible venue" | ||
And the Body should be "So now all who escaped death in battle or by shipwreck had got safely home except Ulysses, and he, though he was longing to return to his wife and country, was detained by the goddess Calypso, who had got him into a large cave and wanted to marry him. But as years went by, there came a time when the gods settled that he should go back to Ithaca; even then, however, when he was among his own people, his troubles were not yet over; nevertheless all the gods had now begun to pity him except Neptune, who still persecuted him without ceasing and would not let him get home." | ||
And the Image is asserted to be present | ||
And the Booking Url link should be "http://examplebook.com" | ||
And the Booking Text should be "External Link" | ||
And the Booking Button should open in a new window |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* global before, after, cy */ | ||
|
||
before(function () { | ||
cy.fixture('Pages/Event/event').as('pageData') | ||
cy.get('@pageData').then(data => { | ||
cy.task('createEventPage', data).as('nodeId') | ||
}) | ||
}) | ||
|
||
after(function () { | ||
if (this.nodeId) { | ||
cy.task('deleteNode', this.nodeId) | ||
} | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* global cy */ | ||
|
||
import { Then } from 'cypress-cucumber-preprocessor/steps' | ||
|
||
Then(`the Description should be {string}`, (description) => { | ||
cy.get('.tide-event-content .rpl-col:nth-child(1) .rpl-markup .rpl-markup__inner').should('contain', description) | ||
}) | ||
|
||
Then(`the Dates should be {string}`, (dates) => { | ||
cy.get(`.tide-event-content .rpl-list .rpl-list__list-item:nth-child(1) .rpl-list__text`).should('contain', dates) | ||
}) | ||
|
||
Then(`the Address should be {string}`, (address) => { | ||
cy.get(`.tide-event-content .rpl-list .rpl-list__list-item:nth-child(2) .rpl-list__text`).should('contain', address) | ||
}) | ||
|
||
Then(`the Price should be {string}`, (price) => { | ||
cy.get(`.tide-event-content .rpl-list .rpl-list__list-item:nth-child(3) .rpl-list__text`).should('contain', price) | ||
}) | ||
|
||
Then(`the Web url should be {string}`, (webUrl) => { | ||
cy.get(`.tide-event-content .rpl-list .rpl-list__list-item:nth-child(4) .rpl-list__text`).should('contain', webUrl) | ||
}) | ||
|
||
Then(`the Requirements should be {string}`, (requirements) => { | ||
cy.get(`.tide-event-content .rpl-list .rpl-list__list-item:nth-child(5) .rpl-list__text`).should('contain', requirements) | ||
}) | ||
|
||
Then(`the Body should be {string}`, (body) => { | ||
cy.get('.tide-event-content .rpl-col:nth-child(3) .rpl-markup .rpl-markup__inner').should('contain', body) | ||
}) | ||
|
||
Then(`the Image is asserted to be present`, () => { | ||
cy.get('.tide-event-content .embedded-entity--media--image').should('exist') | ||
}) | ||
|
||
Then(`the Booking Url link should be {string}`, (value) => { | ||
cy.get('.tide-event-content .rpl-button').should('have.attr', 'href', value) | ||
}) | ||
|
||
Then(`the Booking Text should be {string}`, (value) => { | ||
cy.get('.tide-event-content .rpl-button').should('contain', value) | ||
}) | ||
|
||
Then(`the Booking Button should open in a new window`, () => { | ||
cy.get('.tide-event-content .rpl-button').should('have.attr', 'target', '_blank') | ||
}) |
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