From d004ac7de8db0e3da8082a2e5e4a0767a7114d44 Mon Sep 17 00:00:00 2001 From: dylankelly Date: Fri, 18 Oct 2019 14:35:13 +1100 Subject: [PATCH] Update create ripple app (#570) * Fix task which copies tests into new projects * fix test * CR Changes and add site domain to fixtures * remove campaign test from homepage --- .../e2e/fixtures/grant/Forms/addgrant.json | 8 - .../test/e2e/fixtures/grant/Forms/tc9c.csv | 17 - .../fixtures/grant/Forms/tc9c_submission.json | 67 -- .../test/e2e/fixtures/grant/Forms/tc9d.csv | 17 - .../core-modules/alert/alert.feature | 30 - .../authenticated-content.feature | 2 +- .../core-modules/event/event.feature | 2 - .../core-modules/page/page.feature | 1 - .../content-preview/preview-content.feature | 4 +- .../e2e/integration/smoke/Homepage.feature | 1 - package.json | 3 +- .../create-ripple-app/__tests__/new.test.js | 4 +- packages/create-ripple-app/cli.js | 2 +- .../generators/new/saofile.js | 16 +- .../create-ripple-app/template/_package.json | 4 +- .../_tests/_common/test/e2e/README.md | 5 + .../e2e/fixtures/snippets/BE-examplebody.html | 64 -- .../e2e/fixtures/snippets/FE-examplebody.html | 4 - .../e2e/fixtures/snippets/blockquote.html | 1 + .../test/e2e/fixtures/snippets/callout.html | 1 + .../test/e2e/fixtures/snippets/document.html | 1 + .../content-preview/preview-content.feature | 33 - .../preview-content/step_definition.js | 63 -- .../integration/core/global/quickexit.feature | 6 - .../test/e2e/integration/custom/README.md | 1 + .../e2e/integration/smoke/Homepage.feature | 1 - .../e2e/integration/smoke/tide-is-up.feature | 7 +- .../test/e2e/fixtures/alert/1-BE-Alert-1.yml | 2 +- .../test/e2e/fixtures/alert/1-BE-Alert-2.yml | 2 +- .../test/e2e/fixtures/alert/1-BE-Alert-3.yml | 4 +- .../test/e2e/fixtures/event/2-BE-event-1.yml | 2 +- .../landingPage/1-FE-auth-content-4.yml | 137 ---- ...-be-land-3-landing-page-complete-test.html | 1 + ...5-be-land-3-landing-page-complete-test.yml | 583 ++++++++++++++++++ .../fixtures/page/8-BE-page-1-basic-page.yml | 1 - .../e2e/fixtures/profile/4-BE-Profile-1.yml | 82 --- .../17-BE-pub-1-Create-Parent-Page.yml | 113 ---- .../core-modules/alert/alert.feature | 32 +- .../authenticated-content.feature | 88 +-- .../authenticated-content/hooks.js | 17 - .../authenticated-content/step_definition.js | 93 --- .../core-modules/event/event.feature | 3 - .../core-modules/grant/grant.feature | 72 +-- .../core-modules/grant/submit-a-grant.feature | 20 +- .../landingPage/LandingPage.feature | 25 +- .../core-modules/page/page.feature | 19 +- .../search/topic-tags-search.feature | 17 - .../content-preview/preview-content.feature | 33 - .../preview-content/step_definition.js | 63 -- .../integration/core/global/quickexit.feature | 6 - .../template/nuxt/.sass-lint.yml | 42 ++ packages/ripple-test-tools/package.json | 7 +- .../scripts/cucumberconvertor.js | 28 + .../step_definitions/common/index.js | 2 + .../common/modules/events.js} | 2 +- .../ripple-test-tools/tide-admin/index.js | 2 +- scripts/cucumberconvertor.js | 12 - 57 files changed, 723 insertions(+), 1152 deletions(-) delete mode 100644 examples/vic-gov-au/test/e2e/fixtures/grant/Forms/addgrant.json delete mode 100644 examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c.csv delete mode 100644 examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c_submission.json delete mode 100644 examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9d.csv create mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/README.md delete mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/BE-examplebody.html delete mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/FE-examplebody.html create mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/blockquote.html create mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/callout.html create mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/document.html delete mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content.feature delete mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content/step_definition.js delete mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/global/quickexit.feature create mode 100644 packages/create-ripple-app/template/_tests/_common/test/e2e/integration/custom/README.md delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/1-FE-auth-content-4.yml create mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.html create mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.yml delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/profile/4-BE-Profile-1.yml delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/publication/17-BE-pub-1-Create-Parent-Page.yml delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/hooks.js delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/step_definition.js delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/search/topic-tags-search.feature delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content.feature delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content/step_definition.js delete mode 100644 packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/global/quickexit.feature create mode 100644 packages/create-ripple-app/template/nuxt/.sass-lint.yml create mode 100755 packages/ripple-test-tools/scripts/cucumberconvertor.js rename packages/{create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event/step_definition.js => ripple-test-tools/step_definitions/common/modules/events.js} (96%) delete mode 100644 scripts/cucumberconvertor.js diff --git a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/addgrant.json b/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/addgrant.json deleted file mode 100644 index 6b717ac50..000000000 --- a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/addgrant.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "sample grant", - "description": "grant description", - "websiteUrl": "http://www.google.com", - "name": "First Last", - "email": "email@domain.com", - "phone": "039393399" -} \ No newline at end of file diff --git a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c.csv b/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c.csv deleted file mode 100644 index 2b529d486..000000000 --- a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c.csv +++ /dev/null @@ -1,17 +0,0 @@ -key,value,random -name,Extra special grant, -description,this is the description, -openDate,23/04/2019, -closeDate,23/05/2019, -ongoing,FALSE, -topic,Communities, -audience,"Government, Individual", -amountFrom,123123, -amountTo,234234, -applyUrl,http://www.google.com, -infoUrl,http://www.google.com, -contactName,Stan Grant, -contactDepartment,DPC, -contactEmail,stan@mailinator.com, -contactPhone,03 91222222, -acknowledge,TRUE, \ No newline at end of file diff --git a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c_submission.json b/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c_submission.json deleted file mode 100644 index 891ad3688..000000000 --- a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9c_submission.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "data": { - "type": "webform_submission--tide_grant_submission", - "id": "676206fe-cd10-45e9-8961-047a3b33db2f", - "links": { - "self": { - "href": "https://www.develop.content.vic.gov.au/api/v1/webform_submission/tide_grant_submission/676206fe-cd10-45e9-8961-047a3b33db2f" - } - }, - "attributes": { - "serial": 35, - "drupal_internal__sid": 1678, - "token": "Kem7EbKwhwIORFG5CLG_RCo-G32n0b-V6HQ7PBpswD4", - "uri": "/api/v1/webform_submission/tide_grant_submission", - "created": "2019-05-02T23:49:32+00:00", - "completed": "2019-05-02T23:49:32+00:00", - "changed": "2019-05-02T23:49:32+00:00", - "in_draft": false, - "current_page": null, - "remote_addr": "110.175.218.22", - "langcode": "en", - "entity_type": null, - "entity_id": null, - "locked": false, - "sticky": false, - "notes": null, - "metatag": null, - "metatag_normalized": [], - "data": null - }, - "relationships": { - "uid": { - "data": null, - "links": { - "self": { - "href": "https://www.develop.content.vic.gov.au/api/v1/webform_submission/tide_grant_submission/676206fe-cd10-45e9-8961-047a3b33db2f/relationships/uid" - } - } - }, - "webform_id": { - "data": { - "type": "webform--webform", - "id": "44306317-f07a-4744-8017-a21a32063190" - }, - "links": { - "self": { - "href": "https://www.develop.content.vic.gov.au/api/v1/webform_submission/tide_grant_submission/676206fe-cd10-45e9-8961-047a3b33db2f/relationships/webform_id" - }, - "related": { - "href": "https://www.develop.content.vic.gov.au/api/v1/webform_submission/tide_grant_submission/676206fe-cd10-45e9-8961-047a3b33db2f/webform_id" - } - } - } - } - }, - "jsonapi": { - "version": "1.0", - "meta": { - "links": { "self": { "href": "http://jsonapi.org/format/1.0/" } } - } - }, - "links": { - "self": { - "href": "https://www.develop.content.vic.gov.au/api/v1/webform_submission/tide_grant_submission" - } - } -} diff --git a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9d.csv b/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9d.csv deleted file mode 100644 index 7ea1ac5c9..000000000 --- a/examples/vic-gov-au/test/e2e/fixtures/grant/Forms/tc9d.csv +++ /dev/null @@ -1,17 +0,0 @@ -key,value,random -name,, -description,, -openDate,, -closeDate,, -ongoing,, -topic,, -audience,, -amountFrom,, -amountTo,, -applyUrl,, -infoUrl,, -contactName,, -contactDepartment,, -contactEmail,, -contactPhone,, -acknowledge,, \ No newline at end of file diff --git a/examples/vic-gov-au/test/e2e/integration/core-modules/alert/alert.feature b/examples/vic-gov-au/test/e2e/integration/core-modules/alert/alert.feature index 24a40f997..c40f2a316 100644 --- a/examples/vic-gov-au/test/e2e/integration/core-modules/alert/alert.feature +++ b/examples/vic-gov-au/test/e2e/integration/core-modules/alert/alert.feature @@ -11,33 +11,3 @@ Feature: Global Notifications (Alert) Then there should be the following global notifications: | title | type | link | linkText | | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - - # Demo content module has an issue creating alert without primary site - skip test until that is fixed - # @skip - # Scenario: 1-FE-Alert-2 Displays site section alert - # Given I have created a node with the YAML fixture "alert/1-BE-Alert-2" - # When I visit the page "/" - # Then there should be the following global notifications: - # | title | type | link | linkText | - # | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - # And I visit the page "/first-home-buyers-checklist" - # And there should be the following global notifications: - # | title | type | link | linkText | - # | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - # | 1-BE-Alert-2 Demo Alert | Heat Wave | https://vic.gov.au | More details | - # When I visit the page "/" - # Then there should be the following global notifications: - # | title | type | link | linkText | - # | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - - # Scenario: 1-FE-Alert-2 Displays site section alert - # When I visit the page "/" - # Given I have created a node with the YAML fixture "alert/1-BE-Alert-3" - # And I wait for 61 seconds - # And I visit the page "/demo-landing-page" - # Then I should see 2 global notification - # And there should be the following global notifications: - # | title | type | link | linkText | - # | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - # | 1-BE-Alert-3 Demo Alert | Flood | https://vic.gov.au | More details | - diff --git a/examples/vic-gov-au/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature b/examples/vic-gov-au/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature index 2ff08361a..b989ee2a3 100644 --- a/examples/vic-gov-au/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature +++ b/examples/vic-gov-au/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature @@ -38,7 +38,7 @@ Feature: Protected content Given the "/1-fe-auth-content-4" page exists with fixture "landingPage/1-FE-auth-content-4" data When I visit the page "/1-fe-auth-content-4" Then I should see a 404 page - + @skip Scenario: Accessing a protected content page when authenticated Given the "/1-fe-auth-content-4" page exists with fixture "landingPage/1-FE-auth-content-4" data And there is a user in the system with the following credentials: diff --git a/examples/vic-gov-au/test/e2e/integration/core-modules/event/event.feature b/examples/vic-gov-au/test/e2e/integration/core-modules/event/event.feature index d3d291474..2752f92fb 100644 --- a/examples/vic-gov-au/test/e2e/integration/core-modules/event/event.feature +++ b/examples/vic-gov-au/test/e2e/integration/core-modules/event/event.feature @@ -11,8 +11,6 @@ Feature: Event page And the event page Address should be "45 Collins St, Melbourne, VIC 3000" And the event page Price should be "34.33 - 89.95" And the event page Web url should be "http://www.weatherzone.com.au/vic/central/healesville" - # And the Requirements should be "Accessible venue" And the event page 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 event page Image should be present And the event page Booking Url link should be "http://examplebook.com" And the event page Booking Text should be "Booking URL" diff --git a/examples/vic-gov-au/test/e2e/integration/core-modules/page/page.feature b/examples/vic-gov-au/test/e2e/integration/core-modules/page/page.feature index df8981e02..7bdf9c7e6 100644 --- a/examples/vic-gov-au/test/e2e/integration/core-modules/page/page.feature +++ b/examples/vic-gov-au/test/e2e/integration/core-modules/page/page.feature @@ -34,6 +34,5 @@ Feature: Basic Page | Twitter | | Facebook | | LinkedIn | - And the share this links should read "open in a new window" to screen readers diff --git a/examples/vic-gov-au/test/e2e/integration/core/content-preview/preview-content.feature b/examples/vic-gov-au/test/e2e/integration/core/content-preview/preview-content.feature index 8f15074b0..e0b1f9db8 100644 --- a/examples/vic-gov-au/test/e2e/integration/core/content-preview/preview-content.feature +++ b/examples/vic-gov-au/test/e2e/integration/core/content-preview/preview-content.feature @@ -1,12 +1,12 @@ Feature: Preview content As an authorized user I want to be able to view previews which are not visible to the general public. - + @skip Scenario: No access to a draft page when unauthenticated Given the "/1-fe-content-preview-1" page exists with fixture "core/content-preview/1-fe-content-preview-1" data When I visit the page "/1-fe-content-preview-1" Then I should see a 404 page - + @skip Scenario: Accessing a preview when unauthorized redirects to login Given I have created a landing page with the json fixture "Pages/LandingPage/draft" And I have navigated to the created preview page diff --git a/examples/vic-gov-au/test/e2e/integration/smoke/Homepage.feature b/examples/vic-gov-au/test/e2e/integration/smoke/Homepage.feature index c851b80be..1d6b02811 100644 --- a/examples/vic-gov-au/test/e2e/integration/smoke/Homepage.feature +++ b/examples/vic-gov-au/test/e2e/integration/smoke/Homepage.feature @@ -12,7 +12,6 @@ Feature: Home Page And the breadcrumbs should not exist And the site header is visible And the site footer is visible - And the campaign primary banner component should exist # Need to fix existing errors or work out ruleset to skip @a11y @skip diff --git a/package.json b/package.json index 2450f8247..da9ec09dd 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test:smoke-vic": "cd examples/vic-gov-au/ && yarn test:smoke", "test:smoke-example": "cd examples/vic-gov-au/ && yarn test:smoke", "test:unit": "jest --colors", - "test:report": "node ./scripts/cucumberconvertor.js", + "test:report": "node ./packages/ripple-test-tools/scripts/cucumberconvertor.js ./test-results/cucumber", "build:storybook": "cd src && yarn build-storybook", "build:vic-gov-au": "cd examples/vic-gov-au && yarn run build", "lint": "sass-lint && yarn lint:es", @@ -63,7 +63,6 @@ "babel-preset-vue": "^2.0.2", "core-js": "^2.6.5", "cross-env": "^5.2.0", - "cucumber-junit-convert": "^1.1.0", "eslint": "^5.11.1", "eslint-config-standard": "^12.0.0", "eslint-friendly-formatter": "^3.0.0", diff --git a/packages/create-ripple-app/__tests__/new.test.js b/packages/create-ripple-app/__tests__/new.test.js index b805b65a8..3eb3d70af 100644 --- a/packages/create-ripple-app/__tests__/new.test.js +++ b/packages/create-ripple-app/__tests__/new.test.js @@ -43,7 +43,9 @@ describe('Test new project generator', () => { searchurl: 'elasticdev.sdp.vic.gov.au', searchindex: '', searchusername: '', - searchpassword: '' + searchpassword: '', + adminuser: 'dummyuser', + adminpass: 'dummypass' } const stream = await sao({ generator, logLevel: 2, config }, mockPromptAnswers) diff --git a/packages/create-ripple-app/cli.js b/packages/create-ripple-app/cli.js index d7d6bc1ec..35a7496bf 100755 --- a/packages/create-ripple-app/cli.js +++ b/packages/create-ripple-app/cli.js @@ -22,7 +22,7 @@ const log = (msg, lvl = 'info') => { const configFile = args.config let configFileArgs = {} if (configFile && fs.existsSync(__dirname, configFile)) { - configFileArgs = require(path.resolve(process.cwd(), configFile)) + configFileArgs = require(path.resolve(__dirname, configFile)) } // param args take precedence const config = { diff --git a/packages/create-ripple-app/generators/new/saofile.js b/packages/create-ripple-app/generators/new/saofile.js index 47ef42fad..ab5a751d9 100644 --- a/packages/create-ripple-app/generators/new/saofile.js +++ b/packages/create-ripple-app/generators/new/saofile.js @@ -53,12 +53,14 @@ module.exports = { }) } - if (results.e2e || results.smoke) { - actions.push({ - type: 'add', - files: ['**'], - templateDir: '/_tests/_common' - }) + if (results.smoke || results.e2e) { + actions.push( + { + type: 'add', + files: ['**'], + templateDir: `${templateDir}/_tests/_common` + } + ) } if (results.smoke) { @@ -71,7 +73,7 @@ module.exports = { if (results.e2e) { // only add tests for enabled modules results.modules.forEach(tideModule => { - const hasTests = fs.existsSync(path.resolve(__dirname, `./template/_tests/_modules/test/e2e/integration/core-modules/${tideModule}`)) + const hasTests = fs.existsSync(path.resolve(__dirname, `${templateDir}/_tests/_modules/test/e2e/integration/core-modules/${tideModule}`)) if (hasTests) { actions.push( { diff --git a/packages/create-ripple-app/template/_package.json b/packages/create-ripple-app/template/_package.json index ff691efe3..8abba25d9 100644 --- a/packages/create-ripple-app/template/_package.json +++ b/packages/create-ripple-app/template/_package.json @@ -14,10 +14,10 @@ "cy:run-smoke": "cypress run -e TAGS='@smoke' --spec 'test/e2e/integration/smoke/*'", <%_ if (e2e === true) { _%> "cy:run": "cypress run -e TAGS='not @skip or @smoke'", - "test:e2e": "cross-env NODE_ENV=test BASIC_AUTH=0 start-server-and-test start:build http://localhost:3000 cy:run", + "test:e2e": "cross-env TEST=1 BASIC_AUTH=0 start-server-and-test start:build http://localhost:3000 cy:run", <%_ } _%> "test:dev": "cross-env NODE_ENV=dev start-server-and-test dev http://localhost:3000 cy:open", - "test:smoke": "cross-env NODE_ENV=test BASIC_AUTH=0 start-server-and-test start:build http://localhost:3000 cy:run-smoke", + "test:smoke": "cross-env TEST=1 BASIC_AUTH=0 start-server-and-test start:build http://localhost:3000 cy:run-smoke", <%_ } _%> <%_ if (unit === true) { _%> "test:unit": "BASIC_AUTH=0 NODE_ENV=test jest --passWithNoTests", diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/README.md b/packages/create-ripple-app/template/_tests/_common/test/e2e/README.md new file mode 100644 index 000000000..a3300e134 --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/README.md @@ -0,0 +1,5 @@ +# End to end tests + +End to end tests are run with the Cypress test framework, Please see cypress.io/docs for usage + +Please add custom tests in /tests/e2e/integration/custom/ folder diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/BE-examplebody.html b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/BE-examplebody.html deleted file mode 100644 index 71f66e151..000000000 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/BE-examplebody.html +++ /dev/null @@ -1,64 +0,0 @@ -

Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae

-

Phasellus congue aliquam vehicula

-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit - amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. Quisque - nec congue ligula, vitae condimentum tellus. Nulla nec urna augue. Curabitur - commodo nisi est, eu pulvinar tortor cursus vel. Morbi dictum ex est, et - semper diam finibus eu. Cras rutrum, nunc a fringilla convallis, massa est - vulputate velit, in blandit augue dui vitae elit. Donec hendrerit commodo - augue, in maximus orci tempor congue. Mauris ultricies euismod orci, nec - vehicula quam vehicula ac. Nunc dictum tortor dolor, nec eleifend orci luctus - sed. -

-

Donec scelerisque cursus ex varius efficitur

-

Morbi cursus placerat mi

-
Nullam laoreet ante placerat
- -

- Integer interdum nisl ut neque dictum, et sagittis metus feugiat. Sed in - mattis neque. Duis at risus non ipsum semper dapibus. Sed enim sapien, - molestie sed commodo vel, lacinia vitae risus. Proin sagittis diam nisi, sed - rhoncus diam varius id. Sed malesuada felis tortor, scelerisque pretium elit - tempor non. Pellentesque ultrices volutpat tincidunt. Fusce quis viverra urna, - quis finibus nulla. -

-
-

- Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit - justo quis finibus. Phasellus lacus lectus, sollicitudin sed posuere non, - ultricies ut quam. -

-
- - Duis ligula lacus
- Phasellus est turpis, efficitur nec odio imperdiet
-
-
-
-
Mauris tincidunt tincidunt felis vel tempus
- -

- Phasellus in varius leo. Suspendisse potenti. Donec scelerisque cursus ex - varius efficitur. Vivamus pretium nisi sed libero accumsan mattis. Duis - convallis, velit eget varius tempus, orci erat aliquam sem, eget porta mauris - nisl at mauris. -

- diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/FE-examplebody.html b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/FE-examplebody.html deleted file mode 100644 index d03293499..000000000 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/FE-examplebody.html +++ /dev/null @@ -1,4 +0,0 @@ -

Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae

Phasellus congue aliquam vehicula

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. Quisque nec congue ligula, vitae condimentum tellus. Nulla nec urna augue. Curabitur commodo nisi est, eu pulvinar tortor cursus vel. Morbi dictum ex est, et semper diam finibus eu. Cras rutrum, nunc a fringilla convallis, massa est vulputate velit, in blandit augue dui vitae elit. Donec hendrerit commodo augue, in maximus orci tempor congue. Mauris ultricies euismod orci, nec vehicula quam vehicula ac. Nunc dictum tortor dolor, nec eleifend orci luctus sed.

Donec scelerisque cursus ex varius efficitur

Morbi cursus placerat mi

Nullam laoreet ante placerat
Demo: Melbourne tram

Integer interdum nisl ut neque dictum, et sagittis metus feugiat. Sed in mattis neque. Duis at risus non ipsum semper dapibus. Sed enim sapien, molestie sed commodo vel, lacinia vitae risus. Proin sagittis diam nisi, sed rhoncus diam varius id. Sed malesuada felis tortor, scelerisque pretium elit tempor non. Pellentesque ultrices volutpat tincidunt. Fusce quis viverra urna, quis finibus nulla.

Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. Phasellus lacus lectus, sollicitudin sed posuere non, ultricies ut quam.

Duis ligula lacus
Phasellus est turpis, efficitur nec odio imperdiet
-Mauris tincidunt tincidunt felis vel tempus - -

Phasellus in varius leo. Suspendisse potenti. Donec scelerisque cursus ex varius efficitur. Vivamus pretium nisi sed libero accumsan mattis. Duis convallis, velit eget varius tempus, orci erat aliquam sem, eget porta mauris nisl at mauris.

\ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/blockquote.html b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/blockquote.html new file mode 100644 index 000000000..b61375c63 --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/blockquote.html @@ -0,0 +1 @@ +

Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. Phasellus lacus lectus, sollicitudin sed posuere non, ultricies ut quam.

Duis ligula lacus
Phasellus est turpis, efficitur nec odio imperdiet
\ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/callout.html b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/callout.html new file mode 100644 index 000000000..22ccc3472 --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/callout.html @@ -0,0 +1 @@ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. Quisque nec congue ligula, vitae condimentum tellus. Nulla nec urna augue. Curabitur commodo nisi est, eu pulvinar tortor cursus vel. Morbi dictum ex est, et semper diam finibus eu. Cras rutrum, nunc a fringilla convallis, massa est vulputate velit, in blandit augue dui vitae elit. Donec hendrerit commodo augue, in maximus orci tempor congue. Mauris ultricies euismod orci, nec vehicula quam vehicula ac. Nunc dictum tortor dolor, nec eleifend orci luctus sed.

\ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/document.html b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/document.html new file mode 100644 index 000000000..50181159c --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/fixtures/snippets/document.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content.feature b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content.feature deleted file mode 100644 index 8f15074b0..000000000 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content.feature +++ /dev/null @@ -1,33 +0,0 @@ -Feature: Preview content - - As an authorized user I want to be able to view previews which are not visible to the general public. - - Scenario: No access to a draft page when unauthenticated - Given the "/1-fe-content-preview-1" page exists with fixture "core/content-preview/1-fe-content-preview-1" data - When I visit the page "/1-fe-content-preview-1" - Then I should see a 404 page - - Scenario: Accessing a preview when unauthorized redirects to login - Given I have created a landing page with the json fixture "Pages/LandingPage/draft" - And I have navigated to the created preview page - Then there should be a redirect to "/login" - And there should be a preview destination query string - - @skip - Scenario: Accessing a preview when authenticated shows page - Given there is a user in the system with the following credentials: - | login | password | active | email | role | - | testuser1 | Password-111 | true | testuser1@mailinator.com | Previewer | - And I have created a landing page with the json fixture "Pages/LandingPage/draft" - And I have navigated to the created preview page - When I enter the the following login credentials: - | login | password | - | testuser1 | Password-111 | - And I submit the login form - And I wait for 6 seconds - Then I should be redirected to the preview page - And there should be a draft banner - And there should be a header logout button - And the h1 should be "Test landing page basic" - And the created page should be removed - And the created user should be removed diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content/step_definition.js b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content/step_definition.js deleted file mode 100644 index eee830597..000000000 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/content-preview/preview-content/step_definition.js +++ /dev/null @@ -1,63 +0,0 @@ -/* global cy */ - -import { Then, When, Given } from 'cypress-cucumber-preprocessor/steps' - -Given(`I have navigated to the created preview page`, () => { - cy.get('@previewLink').then(previewLink => { - cy.visit(previewLink, { failOnStatusCode: false }) - }) -}) - -Then(`there should be a redirect to {string}`, (url) => { - cy.window().its('location.pathname').should('equal', url) -}) - -Then(`there should be a preview destination query string`, () => { - cy.get('@previewLink').then(previewLink => { - cy.window().its('location.search').should('equal', `?destination=${encodeURIComponent(previewLink)}`) - }) -}) - -Then(`I should be redirected to the preview page`, () => { - cy.get('@previewLink').then(previewLink => { - cy.window().its('location.href').should('contain', previewLink) - }) -}) - -Given(`there is a user in the system with the following credentials:`, (dataTable) => { - const user = dataTable.hashes()[0] - const active = Boolean(dataTable.hashes()[0].active === 'true') - - cy.task('createUser', { ...user, active }).as('userId') -}) - -When(`I enter the the following login credentials:`, (dataTable) => { - const login = dataTable.hashes()[0].login - const password = dataTable.hashes()[0].password - cy.get('#username').type(login) - cy.get('#password').type(password) -}) - -When(`I submit the login form`, () => { - cy.get('.field-wrap > input[value="Submit"]').click() -}) - -When(`I wait for {int} seconds`, seconds => { - cy.wait(seconds * 1000) -}) - -Then(`there should be a draft banner`, () => { - cy.get('.rpl-alert-base.app-preview').should('exist') -}) - -Then(`there should be a header logout button`, () => { - cy.get('.rpl-site-header__btn--logout').should('exist') -}) - -Then(`the created user should be removed`, () => { - cy.get('@userId').then(userId => { - if (userId) { - cy.task('deleteUser', userId) - } - }) -}) diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/global/quickexit.feature b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/global/quickexit.feature deleted file mode 100644 index fd03852a0..000000000 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/core/global/quickexit.feature +++ /dev/null @@ -1,6 +0,0 @@ -Feature: Quick exit - - This test is not ready yet - - @skip - Scenario: Test \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/custom/README.md b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/custom/README.md new file mode 100644 index 000000000..3e6eea7f9 --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/custom/README.md @@ -0,0 +1 @@ +**Please put any tests for custom functionality here. This folder will not be overridden by automated updates, whereas the other folders may be modified or deleted.** \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/Homepage.feature b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/Homepage.feature index c851b80be..1d6b02811 100644 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/Homepage.feature +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/Homepage.feature @@ -12,7 +12,6 @@ Feature: Home Page And the breadcrumbs should not exist And the site header is visible And the site footer is visible - And the campaign primary banner component should exist # Need to fix existing errors or work out ruleset to skip @a11y @skip diff --git a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/tide-is-up.feature b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/tide-is-up.feature index d038e74a7..dc09d2255 100644 --- a/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/tide-is-up.feature +++ b/packages/create-ripple-app/template/_tests/_common/test/e2e/integration/smoke/tide-is-up.feature @@ -9,10 +9,5 @@ Feature: Test Tide backend is up @smoke Scenario: Sites endpoint returns a correct response - Given a request is made to "/api/v1/taxonomy_term/sites?site=4" + Given a request is made to "/api/v1/taxonomy_term/sites?site=<%= siteid %>" Then the response code should be 200 - - @smoke - Scenario: Alert endpoint returns a correct response - Given a request is made to "/api/v1/node/alert?site=4&include=field_alert_type" - Then the response code should be 200 \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-1.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-1.yml index 8eed9a4ad..b15088403 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-1.yml +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-1.yml @@ -11,7 +11,7 @@ - workflow: editorial moderation_state: published field_call_to_action: - - uri: https://vic.gov.au + - uri: https://<%= domain %> title: More details # Alert type. field_alert_type: diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-2.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-2.yml index e19396620..d2b155988 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-2.yml +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-2.yml @@ -11,7 +11,7 @@ - workflow: editorial moderation_state: published field_call_to_action: - - uri: https://vic.gov.au + - uri: https://<%= domain %> title: More details # Alert type. field_alert_type: diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-3.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-3.yml index 8869c2815..8c923ce2f 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-3.yml +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/alert/1-BE-Alert-3.yml @@ -11,7 +11,7 @@ - workflow: editorial moderation_state: published field_call_to_action: - - uri: https://vic.gov.au + - uri: https://<%= domain %> title: More details # Alert type. field_alert_type: @@ -28,7 +28,7 @@ args: - taxonomy_term - vid: sites - name: 'Demo Section 1' + name: '<%= domain %>' field_node_primary_site: - '#process': callback: reference diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/event/2-BE-event-1.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/event/2-BE-event-1.yml index 4d9bb43eb..d4a52f83f 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/event/2-BE-event-1.yml +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/event/2-BE-event-1.yml @@ -166,4 +166,4 @@ args: - taxonomy_term - vid: sites - name: '<%= domain %>' \ No newline at end of file + name: 'Demo Site' \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/1-FE-auth-content-4.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/1-FE-auth-content-4.yml deleted file mode 100644 index 7bbad9e2c..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/1-FE-auth-content-4.yml +++ /dev/null @@ -1,137 +0,0 @@ -- entity: node - type: landing_page - title: 1-FE-auth-content-4 - uid: 1 - status: 1 - moderation_state: - - '#process': - callback: reference - args: - - content_moderation_state - - workflow: editorial - moderation_state: published - # Page header. - field_featured_image: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Melbourne tram' - field_landing_page_hero_image: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Melbourne skyline at dusk' - field_graphical_image: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Parliament of Victoria' - field_landing_page_intro_text: Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae - field_landing_page_summary: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. - field_landing_page_hero_theme: light - field_landing_page_bg_colour: white - field_authenticated_content: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: authenticated_content - name: 'Member' - # Hero banner. - field_landing_page_hero_banner: - - entity: paragraph - type: hero_banner_with_cta - field_paragraph_cta: - - uri: https://www.vic.gov.au - title: Phasellus congue - field_paragraph_freetext: Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae - field_paragraph_link_text: - - uri: https://vic.gov.au - title: Nullam laoreet - field_paragraph_background_image: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Staff at Treasury' - field_paragraph_theme: light - # Content Components. - # field_show_table_of_content: 1 - field_landing_page_component: - # Basic Text. - - entity: paragraph - type: basic_text - field_paragraph_body: - - format: rich_text - value: | -

Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae

-

Phasellus congue aliquam vehicula

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. Quisque nec congue ligula, vitae condimentum tellus. Nulla nec urna augue. Curabitur commodo nisi est, eu pulvinar tortor cursus vel. Morbi dictum ex est, et semper diam finibus eu. Cras rutrum, nunc a fringilla convallis, massa est vulputate velit, in blandit augue dui vitae elit. Donec hendrerit commodo augue, in maximus orci tempor congue. Mauris ultricies euismod orci, nec vehicula quam vehicula ac. Nunc dictum tortor dolor, nec eleifend orci luctus sed.

-

Donec scelerisque cursus ex varius efficitur

-

Morbi cursus placerat mi

-
Nullam laoreet ante placerat
-

Integer interdum nisl ut neque dictum, et sagittis metus feugiat. Sed in mattis neque. Duis at risus non ipsum semper dapibus. Sed enim sapien, molestie sed commodo vel, lacinia vitae risus. Proin sagittis diam nisi, sed rhoncus diam varius id. Sed malesuada felis tortor, scelerisque pretium elit tempor non. Pellentesque ultrices volutpat tincidunt. Fusce quis viverra urna, quis finibus nulla.

-
-

Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. Phasellus lacus lectus, sollicitudin sed posuere non, ultricies ut quam.

-
- - Duis ligula lacus
- Phasellus est turpis, efficitur nec odio imperdiet
-
-
-
-
Mauris tincidunt tincidunt felis vel tempus
- -

Phasellus in varius leo. Suspendisse potenti. Donec scelerisque cursus ex varius efficitur. Vivamus pretium nisi sed libero accumsan mattis. Duis convallis, velit eget varius tempus, orci erat aliquam sem, eget porta mauris nisl at mauris.

- - # Topic and Tags. - field_topic: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: topic - name: 'Demo Topic' - # Add authenticated content - field_authenticated_content: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: authenticated_content - name: 'Member' - field_tags: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: tags - name: 'Demo Tag' - - '#process': - callback: reference - args: - - taxonomy_term - - vid: tags - name: 'Another Demo Tag' - # Sites. - field_node_site: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: sites - name: '<%= domain %>' - field_node_primary_site: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: sites - name: '<%= domain %>' diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.html b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.html new file mode 100644 index 000000000..0078fbd48 --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.html @@ -0,0 +1 @@ +

 When I have seen by Time's fell hand defac'd The rich proud cost of outworn buried age; When sometime lofty towers I see down-ras'd And brass eternal slave to mortal rage;

\ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.yml new file mode 100644 index 000000000..d6adc419b --- /dev/null +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/landingPage/5-be-land-3-landing-page-complete-test.yml @@ -0,0 +1,583 @@ +- entity: node + type: landing_page + title: 5-BE-land-3 Landing Page - Complete Test + status: 1 + moderation_state: + - '#process': + callback: reference + args: + - content_moderation_state + - workflow: editorial + moderation_state: published + # Page header. + field_featured_image: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_landing_page_hero_image: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne skyline at dusk' + field_graphical_image: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Parliament of Victoria' + field_landing_page_intro_text: 5-BE-land-3 Landing Page - Complete Test Intro + field_landing_page_summary: 5-BE-land-3 Landing Page - Complete Test - Complete Test Summary. Outside thundered the approaching surf of war and they conducted their quilted pantomime outside time and action. + field_landing_page_hero_theme: light + field_landing_page_bg_colour: white + # Hero banner. + field_landing_page_hero_banner: + - entity: paragraph + type: hero_banner_with_cta + field_paragraph_cta: + - uri: https://www.vic.gov.au + title: Phasellus congue + field_paragraph_freetext: Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae + field_paragraph_link_text: + - uri: https://vic.gov.au + title: Nullam laoreet + field_paragraph_background_image: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Staff at Treasury' + field_paragraph_theme: light + # Key journeys. + field_landing_page_key_journeys: + - entity: paragraph + type: key_journeys + field_paragraph_title: 'Want to know more about...' + field_paragraph_links: + - uri: 'https://vic.gov.au' + title: Nullam laoreet + - uri: 'https://vic.gov.au' + title: Morbi cursus placerat mi + field_paragraph_cta: + - uri: https://vic.gov.au + title: Nullam laoreet + # Header components. + field_landing_page_header: + - entity: paragraph + type: introduction_banner + field_paragraph_title: Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae + field_paragraph_summary: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. + field_paragraph_links: + - uri: 'https://vic.gov.au' + title: Nullam laoreet + - uri: 'https://vic.gov.au' + title: Morbi cursus placerat mi + # Campaigns. + field_landing_page_c_primary: + - '#process': + callback: reference + args: + - block_content + - type: campaign + field_block_title: 'Demo Campaign' + field_show_c_primary_caption: 1 + field_landing_page_c_secondary: + - '#process': + callback: reference + args: + - block_content + - type: campaign + field_block_title: 'Another Demo Campaign' + # Content Components. + field_show_table_of_content: 1 + field_landing_page_component: + # Basic Text. + - entity: paragraph + type: basic_text + field_paragraph_body: + - format: rich_text + value: | +

And in the sky the clouds were twisting and darkness flowed through all the cracks into the sinking vessel of the landscape. Only in the telegraph wires a message still crackled.

+ + +
+

 When I have seen by Time's fell hand defac'd The rich proud cost of outworn buried age; When sometime lofty towers I see down-ras'd And brass eternal slave to mortal rage;

+
+

When I have seen the hungry ocean gain Advantage on the kingdom of the shore, And the firm soil win of the wat'ry main, Increasing store with loss and loss with store; When I have seen such interchange of state, Or state itself confounded to decay; Ruin hath taught me thus to ruminate, That Time will come and take my love away. This thought is as a death, which cannot choose But weep to have that which it fears to lose.

+

+ # Accordion - basic. + - entity: paragraph + type: accordion + field_paragraph_title: Accordion Title + field_paragraph_accordion_style: basic + field_paragraph_accordion: + - entity: paragraph + type: accordion_content + field_paragraph_accordion_name: 'Accordion Content' + field_paragraph_accordion_body: 'Lorem ipsum' + # Accordion - basic 2 + - entity: paragraph + type: accordion + field_paragraph_title: Accordion Title 1 + field_paragraph_accordion_style: basic + field_paragraph_accordion: + - entity: paragraph + type: accordion_content + field_paragraph_accordion_name: 'Accordion Content 1' + field_paragraph_accordion_body: 'Lorem ipsum' + # Call to action. + - entity: paragraph + type: call_to_action + field_paragraph_title: 'Phasellus in varius leo' + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_body: 'Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. Phasellus lacus lectus, sollicitudin sed posuere non, ultricies ut quam.' + field_paragraph_cta: + - uri: https://vic.gov.au + title: Victorian Government + field_paragraph_cta_style: banner + # Card carousel. + - entity: paragraph + type: card_carousel + field_paragraph_title: 'Latest items (Event)' + field_paragraph_latest_items: event + - entity: paragraph + type: card_carousel + field_paragraph_title: 'Latest items (News)' + field_paragraph_latest_items: news + - entity: paragraph + type: card_carousel + field_paragraph_title: 'Card Carousel for Card Event' + field_paragraph_latest_items: null + field_paragraph_items: + - entity: paragraph + type: card_event + field_paragraph_title: 'Carousel Card Event' + field_paragraph_date_range: + - value: '2020-01-01T08:00:00' + end_value: '2020-12-12T10:00:00' + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_topic: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: topic + name: 'Education' + field_paragraph_location: + - country_code: AU + administrative_area: VIC + locality: Melbourne + postal_code: 3000 + address_line1: 35 Collins St + field_paragraph_summary: Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. + field_paragraph_cta: + - uri: https://www.vic.gov.au + title: Read more + - entity: paragraph + type: card_event + field_paragraph_title: 'Carousel Card Event 2' + field_paragraph_date_range: + - value: '2021-01-01T08:22:00' + end_value: '2021-01-01T11:11:00' + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_topic: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: topic + name: 'Education' + field_paragraph_location: + - country_code: AU + administrative_area: VIC + locality: Melbourne + postal_code: 3000 + address_line1: 35 Collins St + field_paragraph_summary: Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. + field_paragraph_cta: + - uri: https://www.vic.gov.au + title: Read more + # Card Event. + - entity: paragraph + type: card_event + field_paragraph_title: 'Card Event 1' + field_paragraph_date_range: + - value: '2018-03-12T14:22:00' + end_value: '2020-12-12T11:11:00' + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_topic: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: topic + name: 'Education' + field_paragraph_location: + - country_code: AU + administrative_area: VIC + locality: Melbourne + postal_code: 3000 + address_line1: 35 Collins St + # Card promotion. + - entity: paragraph + type: card_promotion + field_paragraph_title: 'Card Promotion' + field_paragraph_date: '2019-07-01T23:00:00' + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_summary: Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. + field_paragraph_link: + - uri: https://www.vic.gov.au + title: Vestibulum rhoncus + field_paragraph_topic: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: topic + name: 'Demo Topic' + # Card navigation. + - entity: paragraph + type: card_navigation + field_paragraph_title: 'Card Promotion' + field_paragraph_summary: Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. + field_paragraph_link: + - uri: https://www.vic.gov.au + title: Vestibulum rhoncus + # Card navigation featured. + - entity: paragraph + type: card_navigation_featured + field_paragraph_title: 'Card Promotion' + field_paragraph_summary: Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. + field_paragraph_link: + - uri: https://www.vic.gov.au + title: Vestibulum rhoncus + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + # Card keydates. + - entity: paragraph + type: card_keydates + field_paragraph_keydates: + - entity: paragraph + type: keydates + field_paragraph_keydate: '1 June' + field_paragraph_title: 'Demo Key Date' + field_paragraph_summary: 'First key date summary.' + field_paragraph_link: + - uri: https://www.vic.gov.au + title: First key date link + - entity: paragraph + type: keydates + field_paragraph_keydate: '2 June' + field_paragraph_title: 'Demo Key Date 2' + field_paragraph_summary: 'Second key date summary.' + field_paragraph_link: + - uri: https://www.vic.gov.au + title: Second key date link + field_paragraph_cta: + - uri: https://www.vic.gov.au + title: Read more + # Card promotion auto. + - entity: paragraph + type: card_promotion_auto + field_paragraph_cta_text: Read more + field_paragraph_reference: + - '#process': + callback: reference + args: + - node + - type: page + title: 'Demo Page' + # Card navigation auto. + - entity: paragraph + type: card_navigation_auto + field_paragraph_reference: + - '#process': + callback: reference + args: + - node + - type: page + title: 'Demo Page' + # Card navigation featured auto. + - entity: paragraph + type: card_navigation_featured_auto + field_paragraph_reference: + - '#process': + callback: reference + args: + - node + - type: news + title: 'Demo News' + # Featured news. + - entity: paragraph + type: featured_news + field_paragraph_news_reference: + - '#process': + callback: reference + args: + - node + - type: news + title: 'Demo News' + # Media gallery. + - entity: paragraph + type: media_gallery + field_paragraph_media_gallery: + - '#process': + callback: reference + args: + - block_content + - type: media_gallery + info: Demo Image Gallery block + # News listing. + - entity: paragraph + type: news_listing + field_paragraph_title: 'News Listing' + field_paragraph_topic: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: topic + name: 'Demo Topic' + # Card event. + - entity: paragraph + type: card_event_auto + field_paragraph_cta_text: View more + field_paragraph_reference: + - '#process': + callback: reference + args: + - node + - type: event + title: 'Demo Event' + # latest events + - entity: paragraph + type: latest_events + field_paragraph_title: Demo latest events + field_paragraph_cta_card_event: + - entity: paragraph + type: call_to_action + field_paragraph_title: Latest Event 1 + field_paragraph_body: 'Mauris tincidunt tincidunt felis vel tempus.' + field_paragraph_cta_style: banner + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_cta: + - uri: https://www.vic.gov.au + title: See more + # Timelines + - entity: paragraph + type: timelines + field_paragraph_title: Demo Timeline + field_timeline: + - entity: paragraph + type: timeline + field_paragraph_title: Demo Timeline Item + field_paragraph_date_range: + - value: '2020-01-01T08:00:00' + end_value: '2020-01-01T10:00:00' + field_paragraph_link: https://www.vic.gov.au + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_summary: Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. + - entity: paragraph + type: timeline + field_paragraph_title: Demo Timeline Item 2 + field_paragraph_cta_text: Alternative + field_paragraph_link: https://www.vic.gov.au + field_paragraph_media: + - '#process': + callback: reference + args: + - media + - bundle: image + name: 'Demo: Melbourne tram' + field_paragraph_summary: Anim excepteur magna eu aliqua quis velit voluptate sit culpa. + # What's Next. + field_show_whats_next: 1 + field_whats_next: + - entity: paragraph + type: links + field_paragraph_link: + - uri: https://www.vic.gov.au + title: State Government of Victoria + - entity: paragraph + type: links + field_paragraph_link: + - uri: https://www.vic.gov.au/department-premier-and-cabinet + title: Department of Premier and Cabinet + # Related links + field_show_related_content: 1 + field_related_links: + - entity: paragraph + type: related_links + field_paragraph_link: + - uri: https://www.vic.gov.au + title: State Government of Victoria + - entity: paragraph + type: related_links + field_paragraph_link: + - uri: https://www.vic.gov.au/department-premier-and-cabinet + title: Department of Premier and Cabinet + # Contact. + field_landing_page_show_contact: 1 + field_landing_page_contact: + - entity: paragraph + type: contact_us + field_paragraph_title: Victorian Government + field_paragraph_name: Victorian Government + field_paragraph_email: no-reply@vic.gov.au + field_paragraph_department_name: Department of Premier and Cabinet + field_paragraph_location: + - country_code: AU + administrative_area: VIC + locality: Melbourne + postal_code: 3001 + address_line1: Department of Premier and Cabinet + address_line2: GPO Box 4509 + field_paragraph_postal_address: + - country_code: AU + administrative_area: VIC + locality: Melbourne + postal_code: 3001 + address_line1: Department of Premier and Cabinet + address_line2: GPO Box 4509 + field_paragraph_phones: + - entity: paragraph + type: phone + field_paragraph_phone_title: Calls in Australia + field_paragraph_phone_number: '1300 366 356' + - entity: paragraph + type: phone + field_paragraph_phone_title: Calls from overseas + field_paragraph_phone_number: '+61 3 9603 8804' + field_paragraph_social_media: + - entity: paragraph + type: social_link + field_paragraph_social_list: twitter + field_paragraph_link: + - uri: 'https://twitter.com/VicGovAu' + title: Twitter + # Other. + field_show_social_sharing: 1 + field_show_content_rating: 1 + field_show_site_section_nav: 1 + field_landing_page_nav_title: 'Site-section Navigation' + # Topic and Tags. + field_topic: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: topic + name: 'Equality' + # Sites. + field_node_site: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: sites + name: '<%= domain %>' + field_node_primary_site: + - '#process': + callback: reference + args: + - taxonomy_term + - vid: sites + name: '<%= domain %>' +# Create menu links. +- entity: menu_link_content + title: Demo Landing Page + menu_name: main-tide-demo + weight: 0 + link: + - '#process': + callback: uri_reference + args: + - node + - type: landing_page + title: Demo Landing Page +- entity: menu_link_content + title: Demo Landing Page + menu_name: footer-tide-demo + weight: 0 + link: + - '#process': + callback: uri_reference + args: + - node + - type: landing_page + title: Demo Landing Page +- entity: menu_link_content + title: Demo Landing Page + menu_name: main-tide-demo-another + weight: 0 + link: + - '#process': + callback: uri_reference + args: + - node + - type: landing_page + title: Demo Landing Page +- entity: menu_link_content + title: Demo Landing Page + menu_name: footer-tide-demo-another + weight: 0 + link: + - '#process': + callback: uri_reference + args: + - node + - type: landing_page + title: Demo Landing Page diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/page/8-BE-page-1-basic-page.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/page/8-BE-page-1-basic-page.yml index ba73805a0..22daa1e02 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/page/8-BE-page-1-basic-page.yml +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/page/8-BE-page-1-basic-page.yml @@ -36,7 +36,6 @@

Donec scelerisque cursus ex varius efficitur

Morbi cursus placerat mi

Nullam laoreet ante placerat
-

Integer interdum nisl ut neque dictum, et sagittis metus feugiat. Sed in mattis neque. Duis at risus non ipsum semper dapibus. Sed enim sapien, molestie sed commodo vel, lacinia vitae risus. Proin sagittis diam nisi, sed rhoncus diam varius id. Sed malesuada felis tortor, scelerisque pretium elit tempor non. Pellentesque ultrices volutpat tincidunt. Fusce quis viverra urna, quis finibus nulla.

Mauris tincidunt tincidunt felis vel tempus. Vestibulum rhoncus blandit justo quis finibus. Phasellus lacus lectus, sollicitudin sed posuere non, ultricies ut quam.

diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/profile/4-BE-Profile-1.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/profile/4-BE-Profile-1.yml deleted file mode 100644 index dedaebb6a..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/profile/4-BE-Profile-1.yml +++ /dev/null @@ -1,82 +0,0 @@ -- entity: node - type: profile - title: Profile-4-BE-profile-1 - uid: 1 - status: 1 - moderation_state: - - '#process': - callback: reference - args: - - content_moderation_state - - workflow: editorial - moderation_state: published - field_landing_page_summary: As I walked out one evening, Walking down Bristol Street, The crowds upon the pavement Were fields of harvest wheat. And down by the brimming river I heard a lover sing Under an arch of the railway. Love has no ending. But all the clocks in the city Began to whirr and chime 'O let not Time deceive you, You cannot conquer Time. - field_profile_intro_text: Nulla ultricies dignissim leo, posuere vestibulum erat cursus vitae - # Profile Detail - field_featured_image: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Melbourne tram' - field_profile_category: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: profile_category - name: 'Trailblazer' - field_expertise: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: expertise - name: 'Business and finance' - field_year: - - value: '2017' - field_life_span: - - value: 'Life span text' - field_location: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: location - name: 'Eastern metropolitan Melbourne' - body: - - format: rich_text - value: | -

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.

- # Secondary Campaign - field_landing_page_c_secondary: - - '#process': - callback: reference - args: - - block_content - - type: campaign - field_block_title: 'LGBTI inclusive language guide' - # Topic and Tags. - field_topic: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: topic - name: 'Education' - # Sites. - field_node_site: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: sites - name: '<%= domain %>' - field_node_primary_site: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: sites - name: '<%= domain %>' \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/publication/17-BE-pub-1-Create-Parent-Page.yml b/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/publication/17-BE-pub-1-Create-Parent-Page.yml deleted file mode 100644 index 79979173b..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/fixtures/publication/17-BE-pub-1-Create-Parent-Page.yml +++ /dev/null @@ -1,113 +0,0 @@ -- entity: node - type: publication - title: 17-BE-pub-1 Create Parent Page - uid: 1 - status: 1 - moderation_state: - - '#process': - callback: reference - args: - - content_moderation_state - - workflow: editorial - moderation_state: published - # Page header. - field_publication_date: '2019-06-25' - field_featured_image: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Melbourne tram' - field_license_type: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: license_type - name: Copyright - field_landing_page_intro_text: INTRO Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). END - field_landing_page_summary: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus. - # Content Components. - field_show_table_of_content: 1 - field_landing_page_component: - # Complex Image. - - entity: paragraph - type: complex_image - field_complex_image_title: - - value: Complex Image Title - field_complex_image_media: - - '#process': - callback: reference - args: - - media - - bundle: image - name: 'Demo: Melbourne tram' - field_complex_image_source: - - value: Complex Image Source - field_complex_image_data: - - value: Complex Image Data - field_complex_image_full_label: - - value: Complex Image Fullscreen - field_complex_image_data_label: - - value: Complex Image additional data - field_complex_image_dl_label: - - value: Complex Image Download - # Accordion - basic. - - entity: paragraph - type: accordion - field_paragraph_title: Accordion Title - field_paragraph_accordion_style: numbered - field_paragraph_accordion: - - entity: paragraph - type: accordion_content - field_paragraph_accordion_name: 'Accordion Content' - field_paragraph_accordion_body: 'Lorem ipsum' - - entity: paragraph - type: accordion_content - field_paragraph_accordion_name: 'Accordion Content 1' - field_paragraph_accordion_body: 'Lorem ipsum' - # Basic Text. - - entity: paragraph - type: basic_text - field_paragraph_body: - - format: rich_text - value: | - And in the sky the clouds were twisting and darkness flowed through all the cracks into the sinking vessel of the landscape. Only in the telegraph wires a message still crackled END - # Documents. - field_node_documents: - - '#process': - callback: reference - args: - - media - - bundle: document - name: 'Demo Sample Document' - - '#process': - callback: reference - args: - - media - - bundle: document - name: 'Demo Sample PDF' - # Topic - field_topic: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: topic - name: 'Science and technology' - # Sites. - field_node_site: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: sites - name: '<%= domain %>' - field_node_primary_site: - - '#process': - callback: reference - args: - - taxonomy_term - - vid: sites - name: '<%= domain %>' \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/alert/alert.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/alert/alert.feature index f5d5cb1c4..8fbb6bdcd 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/alert/alert.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/alert/alert.feature @@ -10,34 +10,4 @@ Feature: Global Notifications (Alert) When I visit the page "/" Then there should be the following global notifications: | title | type | link | linkText | - | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - - # Demo content module has an issue creating alert without primary site - skip test until that is fixed - @skip - Scenario: 1-FE-Alert-2 Displays site section alert - Given I have created a node with the YAML fixture "/alert/1-BE-Alert-2" - When I visit the page "/" - Then there should be the following global notifications: - | title | type | link | linkText | - | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - And I visit the page "/first-home-buyers-checklist" - And there should be the following global notifications: - | title | type | link | linkText | - | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - | 1-BE-Alert-2 Demo Alert | Heat Wave | https://vic.gov.au | More details | - When I visit the page "/" - Then there should be the following global notifications: - | title | type | link | linkText | - | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - - Scenario: 1-FE-Alert-2 Displays site section alert - When I visit the page "/" - Given I have created a node with the YAML fixture "alert/1-BE-Alert-3" - And I wait for 61 seconds - And I visit the page "/demo-landing-page" - Then I should see 2 global notification - And there should be the following global notifications: - | title | type | link | linkText | - | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://vic.gov.au | More details | - | 1-BE-Alert-3 Demo Alert | Flood | https://vic.gov.au | More details | - + | 1-BE-Alert-1 Demo Alert | Demo Alert Type | https://<%= domain %> | More details | diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature index dda68a7e3..0d674d442 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content.feature @@ -1,86 +1,6 @@ Feature: Protected content - As authorized I want to be able to login to the site so I can view pages which are not for the general public - - Scenario: 1-FE-auth-content-1 - Login form renders correctly - Given I visit the page "/login" - Then there should be a login form with the title "Login" - And there should be a form field with the label "Username" - And there should be a form field with the label "Password" - And there should be a submit button with the text "Submit" - And there should be a login form button with the text "Register" - And there should be a login form button with the text "Forgot password" - - Scenario: 1-FE-auth-content-2 - Login success - Given there is a user in the system with the following credentials: - | login | password | active | email | - | testuser1 | Password-111 | true | testuser1@mailinator.com | - And I visit the page "/login" - When I enter the the following login credentials: - | login | password | - | testuser1 | Password-111 | - And I submit the login form - Then the login status colour should should be "green" - And the login status message should be "Login Successful." - And the created user should be removed - - Scenario: 1-FE-auth-content-3 - Login failure - Given I visit the page "/login" - When I enter the the following login credentials: - | login | password | - | dummyuser | Pasword-21 | - And I submit the login form - Then the login status colour should should be "red" - And the login status message should be "Login Failed. Please try again" - - Scenario: 1-FE-auth-content-4 - Accessing a protected content page when unauthenticated - Given the "/1-fe-auth-content-4" page exists with fixture "authenticatedContent/1-FE-auth-content-4" data - When I visit the page "/1-fe-auth-content-4" - Then I should see a 404 page - - Scenario: Accessing a protected content page when authenticated - Given the "/1-fe-auth-content-4" page exists with fixture "landingPage/1-FE-auth-content-4" data - And there is a user in the system with the following credentials: - | login | password | active | email | role | - | testuser2 | Password-222 | true | testuser2@mailinator.com | Member | - And I visit the page "/login" - When I enter the the following login credentials: - | login | password | - | testuser2 | Password-222 | - And I submit the login form - Then I should be redirected to the page "/" - Given I visit the page "/1-fe-auth-content-4" - Then the page title should be "1-FE-auth-content-4" - And the h1 should be "1-FE-auth-content-4" - And the created user should be removed - - Scenario: Can still navigate after session is expired - Given the "/1-fe-auth-content-4" page exists with fixture "landingPage/1-FE-auth-content-4" data - And there is a user in the system with the following credentials: - | login | password | active | email | role | - | testuser3 | Password-333 | true | testuser3@mailinator.com | Member | - And I visit the page "/login" - When I enter the the following login credentials: - | login | password | - | testuser3 | Password-333 | - And I submit the login form - Then I should be redirected to the page "/" - When I visit the page "/1-fe-auth-content-4" - Then the page title should be "1-FE-auth-content-4" - And the h1 should be "1-FE-auth-content-4" - When I wait for 60 seconds - Given I have navigated to the created test page - Then the menu should have 2 top level items - And the logout button should not be visible - And the created user should be removed - - # Scenario: Login on a landing page with a login component - # Given I have configured authenticated content in the backend - # And I have created a landing page with the fixture "Pages/ProtectedContent/tc-pc2" - # When I have navigated to the created test page - # Then there should be a login form with the title "Login" - # And there should be a form field with the label "Username" - # And there should be a form field with the label "Password" - # And there should be a submit button with the text "Submit" - # And there should be a login form button with the text "Register" - # And there should be a login form button with the text "Forgot password" + This test is not ready yet + + @skip + Scenario: Test \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/hooks.js b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/hooks.js deleted file mode 100644 index 43d19fe98..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/hooks.js +++ /dev/null @@ -1,17 +0,0 @@ -/* global before, after, cy */ - -before(function () { - cy.task('configureProtectedContent', { - sessionExpiry: '1' - }) -}) - -afterEach(() => { - -}) - -after(function () { - cy.task('configureProtectedContent', { - sessionExpiry: '10' - }) -}) diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/step_definition.js b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/step_definition.js deleted file mode 100644 index 293889565..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/authenticatedContent/authenticated-content/step_definition.js +++ /dev/null @@ -1,93 +0,0 @@ -/* global cy */ - -import { Then, When, Given } from 'cypress-cucumber-preprocessor/steps' - -Then(`there should be a login form with the title {string}`, (title) => { - cy.get('.tide-login__form .tide-login__wrapper h2').should('contain', title) -}) - -Then(`there should be a form field with the label {string}`, (label) => { - cy.get('.tide-login__form label').contains(label).should('exist') -}) - -Then(`there should be a submit button with the text {string}`, (label) => { - cy.get('.tide-login__form .field-submit').contains(label).should('exist') -}) - -Then(`there should be a login form button with the text {string}`, (label) => { - cy.get('.tide-login__switch-list .rpl-button').contains(label).should('exist') -}) - -When(`I enter the the following login credentials:`, (dataTable) => { - const login = dataTable.hashes()[0].login - const password = dataTable.hashes()[0].password - cy.get('#username').type(login) - cy.get('#password').type(password) -}) - -When(`I submit the login form`, () => { - cy.get('.field-wrap > input[value="Submit"]').click() -}) - -Then(`the login status colour should should be {string}`, (status) => { - switch (status) { - case 'green': - cy.get('.rpl-form-alert').should('have.class', 'rpl-form-alert--success') - break - case 'red': - cy.get('.rpl-form-alert').should('have.class', 'rpl-form-alert--danger') - break - } -}) - -Then(`the login status message should be {string}`, (status) => { - cy.get('.rpl-form-alert').should('contain', status) -}) - -Given(`there is a user in the system with the following credentials:`, (dataTable) => { - const user = dataTable.hashes()[0] - const active = Boolean(dataTable.hashes()[0].active === 'true') - - cy.task('createUser', { ...user, active }).as('userId') -}) - -Then(`the created user should be removed`, () => { - cy.get('@userId').then(userId => { - if (userId) { - cy.task('deleteUser', userId) - } - }) -}) - -Given(`I have configured authenticated content in the backend`, (dataTable) => { - const options = { - ...dataTable.hashes()[0] - } - cy.task('configureProtectedContent', options) -}) - -Then(`I should reset authenticated content in the backend to :`, (dataTable) => { - const options = { - ...dataTable.hashes()[0] - } - cy.task('configureProtectedContent', options) -}) - -Then(`the menu should have {int} top level items`, (number) => { - cy.get('.rpl-menu__items--root').children().should('have.length', number) -}) - -Given(`I have navigated to the created test page`, () => { - cy.get('@nodeId').then(nodeId => { - cy.visit(`/node/${nodeId}`, { failOnStatusCode: false }) - }) -}) - -// Then(`there are no console errors`, () => { -// const spy = cy.window().then((win) => { cy.spy(win.console, 'log') }).as('logger') -// expect(spy).to.be.called // eslint-disable-line -// }) - -Then(`the logout button should not be visible`, () => { - cy.get('.rpl-site-header__btn--logout').should('not.be.visible') -}) diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event.feature index dd8c124d7..2752f92fb 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event.feature @@ -11,9 +11,6 @@ Feature: Event page And the event page Address should be "45 Collins St, Melbourne, VIC 3000" And the event page Price should be "34.33 - 89.95" And the event page Web url should be "http://www.weatherzone.com.au/vic/central/healesville" - # And the Requirements should be "Accessible venue" And the event page 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 event page Image should be present And the event page Booking Url link should be "http://examplebook.com" And the event page Booking Text should be "Booking URL" - And the event page Booking Button should open in a new window diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/grant.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/grant.feature index f78bfba7d..0a887750d 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/grant.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/grant.feature @@ -1,70 +1,6 @@ -Feature: Grant page +Feature: Grant - As a citizen I can view information about a specific grant, including grant amount, audience, etc. - https://digital-engagement.atlassian.net/browse/SDPA-175 - - # Before hook - # - Logs into backend - # - Creates grant page from fixture data @pageData and saves node id as @nodeId - - # After hook - # - Deletes node id @nodeId - @skip - Scenario: TC-9a Grant - Simple Test - Date Range - Given I have created a grant page with the fixture "grant/tc9a" - Given the "/1-fe-grant-content-1" page exists with fixture "grant/1-fe-grant-content-1" data - And I have navigated to the created page - Then the page title should be "TC- 9a Grant- Simple Test - Date Range" - And the grant overview title should match test data - And the grant overview price should be "$11,326 - $26,494" - And the grant overview audience should be "Individuals" - And the grant overview open status is "Ongoing" - And the grant overview description should match test data - And the timeline component should exist - And the timeline section title should match test data - And the timeline item title should match test data - And the timeline item date should be "08 April to 08 May 0019" - And the grant guideline section title should be "Guidelines" - And the grant guideline should have the following accordions - | "Eligibility" | - | "Assessment criteria" | - | "Assessment process" | - | "How to apply" | - - @skip - Scenario: TC-9b Grant page - Closed - Given I have created a grant page with the fixture "Pages/Grant/tc9b" - And that the current date is "April 10, 2019 03:24:00" - And I have navigated to the created page - Then the page title should be "TC- 9b Grant- Simple Test - Closed" - And the grant overview title should match test data - And the grant overview price should be "$12,345 - $23,456" - And the grant overview audience should be "Individuals" - And the grant overview open status is "Closed" - And the grant overview description should match test data - And the timeline component should exist - And the timeline section title should match test data - And the timeline item title should match test data - And the timeline item date s\hould be "07 to 08 April" - And the grant guideline section title should be "Guidelines" + This test is not ready yet + @skip - Scenario: TC-10a Grant page - Complete - Given I have created a grant page with the fixture "Pages/Grant/tc10a" - And that the current date is "April 10, 2019 03:24:00" - And I have navigated to the created page - Then the page title should be "TC-10a Grant page - Complete" - And the grant overview title should match test data - And the grant overview price should be "$12,345 - $23,456" - And the grant overview audience should be "Individuals, government" - And the grant overview open status is "Closed" - And the grant overview description should match test data - And the timeline component should exist - And the timeline section title should match test data - And the timeline item title should match test data - And the timeline item date should be "08 April to 08 May 2019" - And the grant guideline section title should be "Guidelines" - And the grant guideline should have the following accordions - | "test1" | - | "test2" | - | "test3" | - | "test4" | \ No newline at end of file + Scenario: Test \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/submit-a-grant.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/submit-a-grant.feature index 285c6f9f7..86f5a37e0 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/submit-a-grant.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/grant/submit-a-grant.feature @@ -1,20 +1,6 @@ Feature: Submit a grant - Form to submit a grant - - # Before : Create Landing page with submit a grant form - @skip - Scenario: Submitting a form successfully - Given I have navigated to the created page - Then the page title should be "Submit a grant landing page" - Then the form title should be "Submit a grant" - Given I have entered the form correctly - When I submit the form - Then I should see the form success message - And the form submission should be saved + This test is not ready yet + @skip - Scenario: Client side error validation - Given I have navigated to the created test page - And I dont fill out any fields - When I submit the form - Then I should see 10 validation errors \ No newline at end of file + Scenario: Test \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/landingPage/LandingPage.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/landingPage/LandingPage.feature index 77652301e..5b286e3cf 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/landingPage/LandingPage.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/landingPage/LandingPage.feature @@ -1,23 +1,6 @@ -Feature: Landing Page Components +Feature: Landing Page - Creating a landing page with components - - # After : Delete node @nodeId - - Scenario: Simple landing page example - Given I have created a landing page with the json fixture "Pages/LandingPage/simple" - And I have navigated to the created test page - Then the site header is visible - - - Scenario: Complex landing page example - Given I have created a landing page with the json fixture "Pages/LandingPage/complex" - And I have navigated to the created test page - Then the site header is visible - Then the site footer is visible + This test is not ready yet - @a11y @skip - Scenario: There are no accessibility errors - Given I have created a landing page with the json fixture "Pages/LandingPage/simple" - And I have navigated to the created test page - Then it has no detectable a11y violations on load \ No newline at end of file + @skip + Scenario: Test \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/page/page.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/page/page.feature index a481d9555..b1ddec418 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/page/page.feature +++ b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/page/page.feature @@ -9,21 +9,23 @@ Feature: Basic Page Then the page title should be "8-BE-page-1 Create Basic page" And the hero banner desciption should be "Intro 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 END." # #Body - And the order number 1 wysiwyg content contains fixture "/snippets/FE-examplebody" + And the order number 1 wysiwyg content contains fixture "snippets/callout" + And the order number 1 wysiwyg content contains fixture "snippets/blockquote" + And the order number 1 wysiwyg content contains fixture "snippets/document" # # Related Links And the related links component should exist And the related links title should be "Related links" And the related links should contain the following links: - | title | url | target | - | Related Link external text | https://emergency.vic.gov.au/respond/# | external | - | Department of Premier and Cabinet | https://www.vic.gov.au/department-premier-and-cabinet | external | + | title | url | + | Related Link external text | https://emergency.vic.gov.au/respond/# | + | Department of Premier and Cabinet | https://www.vic.gov.au/department-premier-and-cabinet | # Whats Next And the whats next component should exist And the whats next title should be "What's next?" And the whats next links should be: - | title | url | target | - | State Government of Victoria | https://www.vic.gov.au | external | - | Department of Premier and Cabinet | https://www.vic.gov.au/department-premier-and-cabinet | external | + | title | url | + | State Government of Victoria | https://www.vic.gov.au | + | Department of Premier and Cabinet | https://www.vic.gov.au/department-premier-and-cabinet | # Share this And the share this component should exist And the share this component should have the title "Share this" @@ -32,6 +34,3 @@ Feature: Basic Page | Twitter | | Facebook | | LinkedIn | - And the share this links should read "open in a new window" to screen readers - - diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/search/topic-tags-search.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/search/topic-tags-search.feature deleted file mode 100644 index fe9adfeb9..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/search/topic-tags-search.feature +++ /dev/null @@ -1,17 +0,0 @@ -Feature: Topics and Tags Search Page - - As a Citizen I can explore results on the site for a given tag/topic so that I can navigate to the related content I want to read - - Scenario: View tag search results - When I visit the page "/tags/aboriginal-victorians" - Then the page title should be "Tags - Aboriginal Victorians" - And the h1 should be "Aboriginal Victorians" - And the search results component should exist - And the content rating component should exist - - Scenario: View topic search results - When I visit the page "/topic/arts-culture-and-heritage" - Then the page title should be "Topic - Arts, culture and heritage" - And the h1 should be "Arts, culture and heritage" - And the search results component should exist - And the content rating component should exist \ No newline at end of file diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content.feature deleted file mode 100644 index 8f15074b0..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content.feature +++ /dev/null @@ -1,33 +0,0 @@ -Feature: Preview content - - As an authorized user I want to be able to view previews which are not visible to the general public. - - Scenario: No access to a draft page when unauthenticated - Given the "/1-fe-content-preview-1" page exists with fixture "core/content-preview/1-fe-content-preview-1" data - When I visit the page "/1-fe-content-preview-1" - Then I should see a 404 page - - Scenario: Accessing a preview when unauthorized redirects to login - Given I have created a landing page with the json fixture "Pages/LandingPage/draft" - And I have navigated to the created preview page - Then there should be a redirect to "/login" - And there should be a preview destination query string - - @skip - Scenario: Accessing a preview when authenticated shows page - Given there is a user in the system with the following credentials: - | login | password | active | email | role | - | testuser1 | Password-111 | true | testuser1@mailinator.com | Previewer | - And I have created a landing page with the json fixture "Pages/LandingPage/draft" - And I have navigated to the created preview page - When I enter the the following login credentials: - | login | password | - | testuser1 | Password-111 | - And I submit the login form - And I wait for 6 seconds - Then I should be redirected to the preview page - And there should be a draft banner - And there should be a header logout button - And the h1 should be "Test landing page basic" - And the created page should be removed - And the created user should be removed diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content/step_definition.js b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content/step_definition.js deleted file mode 100644 index eee830597..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/content-preview/preview-content/step_definition.js +++ /dev/null @@ -1,63 +0,0 @@ -/* global cy */ - -import { Then, When, Given } from 'cypress-cucumber-preprocessor/steps' - -Given(`I have navigated to the created preview page`, () => { - cy.get('@previewLink').then(previewLink => { - cy.visit(previewLink, { failOnStatusCode: false }) - }) -}) - -Then(`there should be a redirect to {string}`, (url) => { - cy.window().its('location.pathname').should('equal', url) -}) - -Then(`there should be a preview destination query string`, () => { - cy.get('@previewLink').then(previewLink => { - cy.window().its('location.search').should('equal', `?destination=${encodeURIComponent(previewLink)}`) - }) -}) - -Then(`I should be redirected to the preview page`, () => { - cy.get('@previewLink').then(previewLink => { - cy.window().its('location.href').should('contain', previewLink) - }) -}) - -Given(`there is a user in the system with the following credentials:`, (dataTable) => { - const user = dataTable.hashes()[0] - const active = Boolean(dataTable.hashes()[0].active === 'true') - - cy.task('createUser', { ...user, active }).as('userId') -}) - -When(`I enter the the following login credentials:`, (dataTable) => { - const login = dataTable.hashes()[0].login - const password = dataTable.hashes()[0].password - cy.get('#username').type(login) - cy.get('#password').type(password) -}) - -When(`I submit the login form`, () => { - cy.get('.field-wrap > input[value="Submit"]').click() -}) - -When(`I wait for {int} seconds`, seconds => { - cy.wait(seconds * 1000) -}) - -Then(`there should be a draft banner`, () => { - cy.get('.rpl-alert-base.app-preview').should('exist') -}) - -Then(`there should be a header logout button`, () => { - cy.get('.rpl-site-header__btn--logout').should('exist') -}) - -Then(`the created user should be removed`, () => { - cy.get('@userId').then(userId => { - if (userId) { - cy.task('deleteUser', userId) - } - }) -}) diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/global/quickexit.feature b/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/global/quickexit.feature deleted file mode 100644 index fd03852a0..000000000 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core/global/quickexit.feature +++ /dev/null @@ -1,6 +0,0 @@ -Feature: Quick exit - - This test is not ready yet - - @skip - Scenario: Test \ No newline at end of file diff --git a/packages/create-ripple-app/template/nuxt/.sass-lint.yml b/packages/create-ripple-app/template/nuxt/.sass-lint.yml new file mode 100644 index 000000000..66360f83e --- /dev/null +++ b/packages/create-ripple-app/template/nuxt/.sass-lint.yml @@ -0,0 +1,42 @@ +options: + merge-default-rules: true + formatter: stylish +# File Options +files: + include: + - 'packages/**/*.scss' + - 'examples/**/*.scss' + exclude: + - 'node_modules/**/*.scss' + - 'packages/**/node_modules/**/*.scss' + - 'examples/**/node_modules/**/*.scss' +# Rule Configuration +rules: + indentation: + - 1 + - + size: 2 + mixin-name-format: + - 1 + - allow-leading-underscore: true + convention: snakecase + mixins-before-declarations: + - 1 + - + exclude: + - rpl_breakpoint + - rpl_breakpoint_down + - rpl_breakpoint_between + - rpl_print + variable-name-format: + - 1 + - + allow-leading-underscore: true + class-name-format: + - 1 + - + convention: hyphenatedbem + nesting-depth: 0 + placeholder-in-extend: 0 + property-sort-order: 0 + function-name-format: 0 diff --git a/packages/ripple-test-tools/package.json b/packages/ripple-test-tools/package.json index 00e4ec432..9fe19be92 100644 --- a/packages/ripple-test-tools/package.json +++ b/packages/ripple-test-tools/package.json @@ -8,11 +8,16 @@ "name": "Dylan Kelly " } ], + "bin": { + "@dpc-sdp/ripple-test-tools/process-report": "/scripts/cucumberconvertor.js" + }, "main": "index.js", "dependencies": { "csvtojson": "^2.0.8", "faker": "^4.1.0", - "puppeteer": "^1.20.0" + "puppeteer": "^1.20.0", + "glob-fs": "^0.1.7", + "cucumber-junit-convert": "^1.1.0" }, "publishConfig": { "access": "public" diff --git a/packages/ripple-test-tools/scripts/cucumberconvertor.js b/packages/ripple-test-tools/scripts/cucumberconvertor.js new file mode 100755 index 000000000..05ef0e091 --- /dev/null +++ b/packages/ripple-test-tools/scripts/cucumberconvertor.js @@ -0,0 +1,28 @@ +#!/usr/bin/env node +const cucumberJunitConvert = require('cucumber-junit-convert') +const glob = require('glob-fs')({ gitignore: false }) +const folder = process.argv.slice(2)[0] +if (!folder) { + console.error('Exiting: no folder defined') + process.exit(1) +} + +try { + const files = glob.readdirSync(`${folder}/*.json`) + if (!files || files.length === 0) { + console.error('Exiting: no files to process') + process.exit(1) + } + files.forEach(f => { + const filename = f.replace(/\.[^/.]+$/, '') + cucumberJunitConvert.convert({ + inputJsonFile: `./${filename}.json`, + outputXmlFile: `./${filename}.xml` + }) + }) + console.log(`Converted ${files.length} cucumber files`) + process.exit(0) +} catch (error) { + console.error('ERROR:', error) + process.exit(1) +} diff --git a/packages/ripple-test-tools/step_definitions/common/index.js b/packages/ripple-test-tools/step_definitions/common/index.js index a8a3ea4ca..60aefe0a9 100644 --- a/packages/ripple-test-tools/step_definitions/common/index.js +++ b/packages/ripple-test-tools/step_definitions/common/index.js @@ -3,3 +3,5 @@ require('./global') require('./components') require('./navigation') require('./utils') + +require('./modules/events') diff --git a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event/step_definition.js b/packages/ripple-test-tools/step_definitions/common/modules/events.js similarity index 96% rename from packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event/step_definition.js rename to packages/ripple-test-tools/step_definitions/common/modules/events.js index c07b2c078..71a6657c3 100644 --- a/packages/create-ripple-app/template/_tests/_modules/test/e2e/integration/core-modules/event/event/step_definition.js +++ b/packages/ripple-test-tools/step_definitions/common/modules/events.js @@ -1,6 +1,6 @@ /* global cy */ -import { Then } from 'cypress-cucumber-preprocessor/steps' +const { Then } = require('cypress-cucumber-preprocessor/steps') Then(`the event page Description should be {string}`, (description) => { cy.get('.tide-event-content .rpl-col:nth-child(1) .rpl-markup .rpl-markup__inner').should('contain', description) diff --git a/packages/ripple-test-tools/tide-admin/index.js b/packages/ripple-test-tools/tide-admin/index.js index 19b1248e6..23ce05763 100644 --- a/packages/ripple-test-tools/tide-admin/index.js +++ b/packages/ripple-test-tools/tide-admin/index.js @@ -24,7 +24,7 @@ module.exports = class TideAdmin { this.options = { wait: { waitUntil: 'networkidle2', timeout: 0 }, start: { - headless: false, + headless: process.env.CYPRESS_HEADLESS_PUPPETEER, args: ['--no-sandbox', '--disable-setuid-sandbox'] } } diff --git a/scripts/cucumberconvertor.js b/scripts/cucumberconvertor.js deleted file mode 100644 index 952437fee..000000000 --- a/scripts/cucumberconvertor.js +++ /dev/null @@ -1,12 +0,0 @@ -const cucumberJunitConvert = require('cucumber-junit-convert') -const glob = require('glob-fs')({ gitignore: false }) - -const files = glob.readdirSync('./test-results/cucumber/*.json') -files.forEach(f => { - const filename = f.replace(/\.[^/.]+$/, '') - cucumberJunitConvert.convert({ - inputJsonFile: `./${filename}.json`, - outputXmlFile: `./${filename}.xml` - }) -}) -console.log(`Converted ${files.length} cucumber files`)