Skip to content

Commit

Permalink
Issue #3442343: Changed the Automated Functional Acceptance Testing f…
Browse files Browse the repository at this point in the history
…or Varbase profile to work with an enabled Varbase Demo content and media assets
  • Loading branch information
Natshah committed May 7, 2024
1 parent b450026 commit 632fd6c
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 120 deletions.
92 changes: 57 additions & 35 deletions tests/features/bootstrap/VarbaseContext.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ The welcome message is made possible by having Varbase Tour module
Then I should see "Welcome to "
And I should see "Get started"
When I click "Get started"
And I wait 2 seconds
And I wait 6s
Then I should see "Tour Switch"
When I click "Next" in the "button" element with the "class" attribute set to "button button--primary shepherd-button "
When I click next button in tour
Then I should see "Editing Your Homepage Layout"
When I click "Next" in the "button" element with the "class" attribute set to "button button--primary shepherd-button "
When I click next button in tour
Then I should see "Start Configuring Your Site Structure"
When I click "Next" in the "button" element with the "class" attribute set to "button button--primary shepherd-button "
When I click next button in tour
Then I should see "Define Your Site Settings"
When I click "Next" in the "button" element with the "class" attribute set to "button button--primary shepherd-button "
When I click next button in tour
Then I should see "Site Content"

@javascript @local @development @staging @production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ So that I will be able to manage files, see where they have been used in content
Scenario: Check if we do have a file named Flag Earth, if not then upload the file dependently
When I go to "/media/add/image"
And wait
Then I should see "Allowed types: png gif jpg jpeg."
Then I should see "Allowed types: png gif jpg jpeg webp."
When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload"
And wait
And I press the "Save" button
Expand Down Expand Up @@ -60,6 +60,7 @@ So that I will be able to manage files, see where they have been used in content
When I fill in "Flag Earth after edit" for "edit-name"
And I press the "Apply" button
And wait
And I scroll to top
Then I should see "Flag Earth after edit"
When I click "Edit" in the "Flag Earth after edit" row
And wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ So that I can use them to enable or disable API service for Varbase APIs.
Given I am a logged in user with the "Site admin" user
When I go to "/media/add/image"
And wait
Then I should see "Allowed types: png gif jpg jpeg."
Then I should see "Allowed types: png gif jpg jpeg webp."
When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload"
And wait
And I press the "Save" button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,23 @@ So that I can make sure that the site looks good in small and medium devices too
Then I should see "Build Your Site Using Varbase!"
And I should see "Layout preview" in the "button" element with the "title" attribute set to "Preview page layout"
When I press "Preview page layout"
Then I should see "iPhone XS"
And I should see "iPhone XS Max"
And I should see "Galaxy S9"
Then I should see "iPhone 15"
And I should see "iPhone 15 Pro Max"
And I should see "Galaxy Tab S9 Ultra"
And I should see "iPad Pro"
And I should see "Galaxy Tab S4"
And I should see "Samsung Galaxy S23 Ultra"
And I should see "Pixel 7"
And I should not see "Configure devices"
When I press "iPhone XS"
Then I should see "iPhone XS" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone XS Max"
Then I should see "iPhone XS Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy S9"
Then I should see "Galaxy S9" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15"
Then I should see "iPhone 15" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15 Pro Max"
Then I should see "iPhone 15 Pro Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPad Pro"
Then I should see "iPad Pro" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy Tab S4"
Then I should see "Galaxy Tab S4" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Samsung Galaxy S23 Ultra"
Then I should see "Samsung Galaxy S23 Ultra" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Pixel 7"
Then I should see "Pixel 7" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"

@javascript @check @local @development @staging @production
Scenario: Check that Content Admin users can access the responsive preview devices
Expand All @@ -52,22 +53,23 @@ So that I can make sure that the site looks good in small and medium devices too
Then I should see "Build Your Site Using Varbase!"
And I should see "Layout preview" in the "button" element with the "title" attribute set to "Preview page layout"
When I press "Preview page layout"
Then I should see "iPhone XS"
And I should see "iPhone XS Max"
And I should see "Galaxy S9"
Then I should see "iPhone 15"
And I should see "iPhone 15 Pro Max"
And I should see "Galaxy Tab S9 Ultra"
And I should see "iPad Pro"
And I should see "Galaxy Tab S4"
And I should see "Samsung Galaxy S23 Ultra"
And I should see "Pixel 7"
And I should not see "Configure devices"
When I press "iPhone XS"
Then I should see "iPhone XS" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone XS Max"
Then I should see "iPhone XS Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy S9"
Then I should see "Galaxy S9" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15"
Then I should see "iPhone 15" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15 Pro Max"
Then I should see "iPhone 15 Pro Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPad Pro"
Then I should see "iPad Pro" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy Tab S4"
Then I should see "Galaxy Tab S4" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Samsung Galaxy S23 Ultra"
Then I should see "Samsung Galaxy S23 Ultra" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Pixel 7"
Then I should see "Pixel 7" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"

@javascript @check @local @development @staging @production
Scenario: Check that SEO Admin users can access the responsive preview devices
Expand All @@ -77,22 +79,23 @@ So that I can make sure that the site looks good in small and medium devices too
Then I should see "Build Your Site Using Varbase!"
And I should see "Layout preview" in the "button" element with the "title" attribute set to "Preview page layout"
When I press "Preview page layout"
Then I should see "iPhone XS"
And I should see "iPhone XS Max"
And I should see "Galaxy S9"
Then I should see "iPhone 15"
And I should see "iPhone 15 Pro Max"
And I should see "Galaxy Tab S9 Ultra"
And I should see "iPad Pro"
And I should see "Galaxy Tab S4"
And I should see "Samsung Galaxy S23 Ultra"
And I should see "Pixel 7"
And I should not see "Configure devices"
When I press "iPhone XS"
Then I should see "iPhone XS" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone XS Max"
Then I should see "iPhone XS Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy S9"
Then I should see "Galaxy S9" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15"
Then I should see "iPhone 15" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15 Pro Max"
Then I should see "iPhone 15 Pro Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPad Pro"
Then I should see "iPad Pro" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy Tab S4"
Then I should see "Galaxy Tab S4" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Samsung Galaxy S23 Ultra"
Then I should see "Samsung Galaxy S23 Ultra" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Pixel 7"
Then I should see "Pixel 7" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"

@javascript @check @local @development @staging @production
Scenario: Check that Site Admin users can access the responsive preview devices
Expand All @@ -102,22 +105,23 @@ So that I can make sure that the site looks good in small and medium devices too
Then I should see "Build Your Site Using Varbase!"
And I should see "Layout preview" in the "button" element with the "title" attribute set to "Preview page layout"
When I press "Preview page layout"
Then I should see "iPhone XS"
And I should see "iPhone XS Max"
And I should see "Galaxy S9"
Then I should see "iPhone 15"
And I should see "iPhone 15 Pro Max"
And I should see "Galaxy Tab S9 Ultra"
And I should see "iPad Pro"
And I should see "Galaxy Tab S4"
And I should see "Samsung Galaxy S23 Ultra"
And I should see "Pixel 7"
And I should not see "Configure devices"
When I press "iPhone XS"
Then I should see "iPhone XS" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone XS Max"
Then I should see "iPhone XS Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy S9"
Then I should see "Galaxy S9" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15"
Then I should see "iPhone 15" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15 Pro Max"
Then I should see "iPhone 15 Pro Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPad Pro"
Then I should see "iPad Pro" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy Tab S4"
Then I should see "Galaxy Tab S4" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Samsung Galaxy S23 Ultra"
Then I should see "Samsung Galaxy S23 Ultra" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Pixel 7"
Then I should see "Pixel 7" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"

@javascript @check @local @development @staging @production
Scenario: Check that user Number 1 can access the responsive preview devices and configure devices
Expand All @@ -127,19 +131,20 @@ So that I can make sure that the site looks good in small and medium devices too
Then I should see "Build Your Site Using Varbase!"
And I should see "Layout preview" in the "button" element with the "title" attribute set to "Preview page layout"
When I press "Preview page layout"
Then I should see "iPhone XS"
And I should see "iPhone XS Max"
And I should see "Galaxy S9"
Then I should see "iPhone 15"
And I should see "iPhone 15 Pro Max"
And I should see "Galaxy Tab S9 Ultra"
And I should see "iPad Pro"
And I should see "Galaxy Tab S4"
And I should see "Samsung Galaxy S23 Ultra"
And I should see "Pixel 7"
And I should see "Configure devices"
When I press "iPhone XS"
Then I should see "iPhone XS" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone XS Max"
Then I should see "iPhone XS Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy S9"
Then I should see "Galaxy S9" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15"
Then I should see "iPhone 15" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPhone 15 Pro Max"
Then I should see "iPhone 15 Pro Max" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "iPad Pro"
Then I should see "iPad Pro" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Galaxy Tab S4"
Then I should see "Galaxy Tab S4" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Samsung Galaxy S23 Ultra"
Then I should see "Samsung Galaxy S23 Ultra" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
When I press "Pixel 7"
Then I should see "Pixel 7" in the "span" element with the "class" attribute set to "responsive-preview-device-label-text"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ So that the Landing page (Paragraphs) will show up having paragrpahs of differen
Given I am a logged in user with the "Site admin" user
When I go to "/media/add/image"
And wait
Then I should see "Allowed types: png gif jpg jpeg."
Then I should see "Allowed types: png gif jpg jpeg webp."
When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload"
And wait
And I press the "Save" button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Given I am a logged in user with the "Site admin" user
# When I go to "/media/add/image"
# And wait
# Then I should see "Allowed types: png gif jpg jpeg."
# Then I should see "Allowed types: png gif jpg jpeg webp."
# When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload"
# And wait
# And I press the "Save" button
Expand Down

0 comments on commit 632fd6c

Please sign in to comment.