Text
Text
Text
image: quay.io/pantheon-public/build-tools-ci:6.x
pipelines:
branches:
'{master,staging,ci-*}':
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --no-ansi --no-interaction --optimize-autoloader --no-progress
- CI_BRANCH=$BITBUCKET_BRANCH CI_BUILD_NUMBER=$BITBUCKET_BUILD_NUMBER
- source ~/.bashrc && composer -n install
- terminus -n auth:login --machine-token="$TERMINUS_TOKEN"
- source ~/.bashrc &&./.ci/deploy/dev-multidev
#!/bin/bash
# Authenticate with Terminus
terminus -n auth:login --machine-token="$TERMINUS_TOKEN"
# Prepare for Pantheon
composer run prepare-for-pantheon
if [[ $CI_BRANCH != $DEFAULT_BRANCH ]]
then
# Push to the dev environment
terminus -n build:env:push "$TERMINUS_SITE.dev" --yes
fi
# Run update-db to ensure that the cloned database is updated for the new code.
terminus -n wp $TERMINUS_SITE.$TERMINUS_ENV -- core update-db
# Clear the site environment's cache
terminus -n env:clear-cache "$TERMINUS_SITE.$TERMINUS_ENV"
# Ensure secrets are set
terminus -n secrets:set "$TERMINUS_SITE.$TERMINUS_ENV" token "$GITHUB_TOKEN" --file='github-secrets.json' --clear --skip-if-empty
# Delete old multidev environments associated
# with a PR that has been merged or closed.
terminus -n build:env:delete:ci $TERMINUS_SITE --keep=3 --yes
Feature: Manage plugins
In order to manage plugins
As an admin
I need to enable and disable plugins
Background:
Given I have a vanilla wordpress installation
| name | email | username | password |
| BDD WordPress | your@email.com | admin | test |
And I am logged in as "admin" with password "test"
Scenario: Enable the dolly plugin
Given there are plugins
| plugin | status |
| hello.php | enabled |
When I go to "/wp-admin/"
Then I should see a "#dolly" element
Scenario: Disable the dolly plugin
Given there are plugins
| plugin | status |
| hello.php | disabled |
When I go to "/wp-admin/"
Then I should not see a "#dolly" element