Skip to content

Commit

Permalink
Updated Behat Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Fernandes committed Sep 24, 2024
1 parent d1a8218 commit 8e65a90
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tests/behat/features/paragraph.civictheme_promo.render.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Feature: Promo render
Scenario: CivicTheme page content type page can be viewed by anonymous with Promo light with vertical spacing without background
Given I am an anonymous user
And "field_c_n_components" in "civictheme_page" "node" with "title" of "[TEST] Page Promo test 1" has "civictheme_promo" paragraph:
| field_c_p_title | [TEST] Promo title |
| field_c_p_theme | light |
| field_c_p_content:value | [TEST] Content text |
| field_c_p_content:format | civictheme_rich_text |
| field_c_p_vertical_spacing | both |
| field_c_p_link | 0: [TEST] link 1 - 1: https://example.com/link1 |
| field_c_p_title | [TEST] Promo title |
| field_c_p_theme | light |
| field_c_p_content:value | [TEST] Content text |
| field_c_p_content:format | civictheme_rich_text |
| field_c_p_vertical_spacing | both |
| field_c_p_link | 0: [TEST] link 1 PromoTest - 1: https://example.com/link1 |

When I visit "civictheme_page" "[TEST] Page Promo test 1"
And I should see an ".ct-promo" element
Expand All @@ -28,19 +28,20 @@ Feature: Promo render
And I should see an ".ct-promo__title" element
And I should see an ".ct-promo__content" element
And the response should contain "[TEST] link 1"
And the response should contain "PromoTest"
And the response should contain "https://example.com/link1"

@api
Scenario: CivicTheme page content type page can be viewed by anonymous with promo dark without vertical space with background
Given I am an anonymous user
And "field_c_n_components" in "civictheme_page" "node" with "title" of "[TEST] Page Promo test 2" has "civictheme_promo" paragraph:
| field_c_p_title | [TEST] Promo title |
| field_c_p_theme | dark |
| field_c_p_content:value | [TEST] Content text |
| field_c_p_content:format | civictheme_rich_text |
| field_c_p_vertical_spacing | 0 |
| field_c_p_background | 1 |
| field_c_p_link | 0: [TEST] link 2 - 1: https://example.com/link2 |
| field_c_p_title | [TEST] Promo title |
| field_c_p_theme | dark |
| field_c_p_content:value | [TEST] Content text |
| field_c_p_content:format | civictheme_rich_text |
| field_c_p_vertical_spacing | 0 |
| field_c_p_background | 1 |
| field_c_p_link | 0: [TEST] link 2 PromoTest - 1: https://example.com/link2 |

When I visit "civictheme_page" "[TEST] Page Promo test 2"
And I should see an ".ct-promo" element
Expand All @@ -53,4 +54,5 @@ Feature: Promo render
And I should see an ".ct-promo__title" element
And I should see an ".ct-promo__content" element
And the response should contain "[TEST] link 2"
And the response should contain "PromoTest"
And the response should contain "https://example.com/link2"

0 comments on commit 8e65a90

Please sign in to comment.