Merge remote-tracking branch 'origin/4.1' into 4

# Conflicts:
#	.travis.yml
This commit is contained in:
Damian Mooyman 2018-04-13 10:25:28 +12:00
commit 8c11f83ed4
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
5 changed files with 25 additions and 13 deletions

View File

@ -5,6 +5,9 @@ dist: trusty
sudo: required sudo: required
group: deprecated-2017Q4 group: deprecated-2017Q4
before_install:
- sudo apt-get update
- sudo apt-get install chromium-chromedriver
cache: cache:
directories: directories:
@ -14,7 +17,6 @@ addons:
apt: apt:
packages: packages:
- tidy - tidy
firefox: "31.0"
env: env:
global: global:
@ -40,6 +42,9 @@ matrix:
env: NPM_TEST=1 env: NPM_TEST=1
before_script: before_script:
# Extra $PATH
- export PATH=/usr/lib/chromium-browser/:$PATH
# Init PHP # Init PHP
- phpenv rehash - phpenv rehash
- phpenv config-rm xdebug.ini - phpenv config-rm xdebug.ini
@ -48,9 +53,8 @@ before_script:
# Install composer dependencies # Install composer dependencies
- composer validate - composer validate
- composer require --no-update silverstripe/recipe-cms:1.2.x-dev - composer require --no-update silverstripe/recipe-testing:^1 silverstripe/recipe-cms:1.2.x-dev
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile - composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
# Install NPM dependencies # Install NPM dependencies
@ -58,8 +62,9 @@ before_script:
# Start behat services # Start behat services
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi - if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
- if [[ $BEHAT_TEST ]]; then cp composer.lock artifacts/; fi
- if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi - if [[ $BEHAT_TEST ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi
- if [[ $BEHAT_TEST ]]; then (vendor/bin/selenium-server-standalone > artifacts/selenium.log 2>&1 &); fi - if [[ $BEHAT_TEST ]]; then (chromedriver > artifacts/chromedriver.log 2>&1 &); fi
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi - if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi
script: script:

View File

@ -17,10 +17,12 @@ default:
extensions: extensions:
SilverStripe\BehatExtension\MinkExtension: SilverStripe\BehatExtension\MinkExtension:
default_session: selenium2 default_session: facebook_web_driver
javascript_session: selenium2 javascript_session: facebook_web_driver
selenium2: facebook_web_driver:
browser: firefox browser: chrome
wd_host: "http://127.0.0.1:9515" #chromedriver port
browser_name: chrome
SilverStripe\BehatExtension\Extension: SilverStripe\BehatExtension\Extension:
screenshot_path: %paths.base%/artifacts/screenshots screenshot_path: %paths.base%/artifacts/screenshots

View File

@ -585,6 +585,14 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'listViewLink' => $this->LinkListViewChildren($node->ID), 'listViewLink' => $this->LinkListViewChildren($node->ID),
'rootTitle' => $rootTitle, 'rootTitle' => $rootTitle,
'extraClass' => $this->getTreeNodeClasses($node), 'extraClass' => $this->getTreeNodeClasses($node),
'Title' => _t(
self::class . '.PAGETYPE_TITLE',
'(Page type: {type}) {title}',
[
'type' => $node->i18n_singular_name(),
'title' => $node->Title,
]
)
]; ];
}; };
} }

View File

@ -28,10 +28,7 @@
"silverstripe/vendor-plugin": "^1.0" "silverstripe/vendor-plugin": "^1.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^5.7", "phpunit/phpunit": "^5.7"
"silverstripe/behat-extension": "^3@dev",
"silverstripe/serve": "^2",
"se/selenium-server-standalone": "2.41.0"
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {

View File

@ -1,5 +1,5 @@
<li id="record-{$node.ID}" data-id="{$node.ID}" data-pagetype="{$node.ClassName}" class="$markingClasses $extraClass"><ins class="jstree-icon">&nbsp;</ins> <li id="record-{$node.ID}" data-id="{$node.ID}" data-pagetype="{$node.ClassName}" class="$markingClasses $extraClass"><ins class="jstree-icon">&nbsp;</ins>
<a href="{$node.CMSEditLink.ATT}" title="{$node.Title.ATT}"><ins class="jstree-icon">&nbsp;</ins> <a href="{$node.CMSEditLink.ATT}" title="{$Title.ATT}"><ins class="jstree-icon">&nbsp;</ins>
<span class="text">{$node.TreeTitle}</span> <span class="text">{$node.TreeTitle}</span>
</a> </a>
$SubTree $SubTree