-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDPA-3545] Fixed video links (#612)
- Loading branch information
Showing
7 changed files
with
160 additions
and
15 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
examples/vic-gov-au/test/e2e/fixtures/media/embedded-video.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
- entity: node | ||
type: landing_page | ||
title: Embedded video test | ||
status: 1 | ||
moderation_state: | ||
- '#process': | ||
callback: reference | ||
args: | ||
- content_moderation_state | ||
- workflow: editorial | ||
moderation_state: published | ||
# Page header. | ||
|
||
field_landing_page_summary: Embedded video test. | ||
field_landing_page_hero_theme: light | ||
field_landing_page_bg_colour: white | ||
|
||
# Content Components. | ||
field_landing_page_component: | ||
# Basic Text. | ||
- entity: paragraph | ||
type: basic_text | ||
field_paragraph_body: | ||
- format: rich_text | ||
value: | | ||
<h2>Victorian women say thank you</h2> | ||
<drupal-entity data-embed-button="tide_media" data-entity-embed-display="view_mode:media.embedded_with_transcript" data-entity-type="media" data-entity-uuid="7be769bb-9e9f-4c63-9a79-6fbd6d3bf48d" data-langcode="en"></drupal-entity> | ||
<p>In September 2019, recipients of the 2019 Queen’s Birthday Honours were presented with their Order of Australia medals, by the Governor at official ceremonies at Government House, Melbourne.</p> | ||
<drupal-entity data-embed-button="tide_media" data-entity-embed-display="view_mode:media.embedded" data-entity-type="media" data-entity-uuid="36edb597-6253-40a0-845f-2de0c47f19e5" data-langcode="en"></drupal-entity> | ||
<p>In April 2019, recipients of the 2019 Australian Day Honours were presented with their Order of Australia medals, by the Governor at official ceremonies at Government House, Melbourne.</p> | ||
# Other. | ||
field_show_social_sharing: 0 | ||
field_show_content_rating: 0 | ||
field_show_site_section_nav: 0 | ||
# 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: 'vic.gov.au' | ||
- '#process': | ||
callback: reference | ||
args: | ||
- taxonomy_term | ||
- vid: sites | ||
name: 'demo.vic.gov.au' | ||
field_node_primary_site: | ||
- '#process': | ||
callback: reference | ||
args: | ||
- taxonomy_term | ||
- vid: sites | ||
name: 'vic.gov.au' |
11 changes: 7 additions & 4 deletions
11
examples/vic-gov-au/test/e2e/integration/core-modules/media/media.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
Feature: Media page | ||
Feature: Media | ||
|
||
This test is not ready yet | ||
Test Media | ||
|
||
@skip | ||
Scenario: Test | ||
Scenario: Embedded media video | ||
Given the "/embedded-video-test" page exists with fixture "media/embedded-video-test" data | ||
When I visit the page "/embedded-video-test" | ||
Then there should be 2 embedded videos | ||
And there should be a embedded video transcript link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/ripple-test-tools/step_definitions/common/modules/media.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* global cy */ | ||
|
||
const { Then } = require('cypress-cucumber-preprocessor/steps') | ||
|
||
Then(`there should be {int} embedded videos`, (number) => { | ||
cy.get('.rpl-embedded-video').its('length').should('eq', number) | ||
}) | ||
|
||
Then(`there should be a embedded video transcript link`, (number) => { | ||
const link = cy.get('.rpl-embed-video__link').find('a') | ||
link.its('href').should('eq', '/media/7008') | ||
link.contains('View transcript') | ||
}) |