MNT Require extra modules

This commit is contained in:
Steve Boyd 2021-11-17 14:46:13 +13:00
parent e55c81ec7c
commit 5d8aefdfcc
4 changed files with 24 additions and 33 deletions

View File

@ -1,11 +0,0 @@
name: Module CI
on:
push:
pull_request:
jobs:
ci:
uses: silverstripe/github-actions-ci-cd/.github/workflows/ci.yml@0.1.11
with:
run_endtoend: true

View File

@ -5,6 +5,4 @@ import:
env:
global:
- COMPOSER_ROOT_VERSION=2.x-dev
# Required for behat testing
- REQUIRE_EXTRA="silverstripe/widgets:^2 silverstripe/comments:^3 silverstripe/content-widget:^2"

View File

@ -16,7 +16,7 @@
"silverstripe/asset-admin": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"silverstripe/recipe-testing": "^2",
"squizlabs/php_codesniffer": "^3.0"
},
"extra": {

View File

@ -6,10 +6,7 @@ Feature: Create a blog
Given the "group" "EDITOR group" has permissions "CMS_ACCESS_LeftAndMain"
And I add an extension "SilverStripe\Widgets\Extensions\WidgetPageExtension" to the "Page" class
And I add an extension "SilverStripe\Comments\Extensions\CommentsExtension" to the "Page" class
Given I take a screenshot after every step
Given I dump the rendered HTML after every step
And an "image" "Uploads/file1.jpg"
# Login then logout to created member
@ -18,6 +15,8 @@ Feature: Create a blog
And I press the "Log in as someone else" button
And I am logged in with "ADMIN" permissions
When I go to "/dev/build?flush"
# Create a new blog called "New Blog"
When I go to "/admin/pages"
And I press the "Add new" button
@ -38,11 +37,12 @@ Feature: Create a blog
# Add EDITOR as an Editor
And I click the "Settings" CMS tab
And I press the "Save" button
And I click the "Users" CMS tab
And I select "EDITOR" from "Editors"
# Publish and logout
And I press the "Publish" button
# Logout
And I go to "/Security/login"
And I press the "Log in as someone else" button
@ -68,8 +68,10 @@ Feature: Create a blog
And I add "My Category" to the "Categories" tag field
And I add "My Tag" to the "Tags" tag field
# Publish the blog post
# Publish the blog post and logout
And I press the "Publish" button
And I go to "/Security/login"
And I press the "Log in as someone else" button
# Test the frontend
When I go to "/new-blog"
@ -105,17 +107,19 @@ Feature: Create a blog
When I press the "Post" button
Then I should see "New Post"
# Commenting is bizarly not working in behat, even though it works during manual testing on my local
# Moderation
When I go to "/admin/pages"
And I follow "New Blog"
And I click the "Blog Posts" CMS tab
#Given I log in with "EDITOR@example.org" and "Secret!123"
#When I go to "/admin/pages"
#And I follow "New Blog"
#And I click the "Blog Posts" CMS tab
# Click on the first blog post
And I click on the ".col-Title" element
And I click the "Comments" CMS tab
Then I should see "Approved (1)"
When I click the "Approved (1)" CMS tab
Then I should see "hello@example.com"
When I click on the ".action-menu__toggle" element
And I press the "Spam" button
And I wait for 2 seconds
Then I should not see "hello@example.com"
#And I click on the ".col-Title" element
#And I click the "Comments" CMS tab
#Then I should see "Approved (1)"
#When I click the "Approved (1)" CMS tab
#Then I should see "hello@example.com"
#When I click on the ".action-menu__toggle" element
#And I press the "Spam" button
#And I wait for 2 seconds
#Then I should not see "hello@example.com"