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

# Conflicts:
#	.travis.yml
This commit is contained in:
Damian Mooyman 2018-04-13 10:03:47 +12:00
commit 61429c17a6
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
group: deprecated-2017Q4
before_install:
- sudo apt-get update
- sudo apt-get install chromium-chromedriver
cache:
directories:
@ -14,7 +17,6 @@ addons:
apt:
packages:
- tidy
firefox: "31.0"
env:
global:
@ -40,6 +42,9 @@ matrix:
env: NPM_TEST=1
before_script:
# Extra $PATH
- export PATH=/usr/lib/chromium-browser/:$PATH
# Init PHP
- phpenv rehash
- phpenv config-rm xdebug.ini
@ -48,9 +53,8 @@ before_script:
# Install composer dependencies
- composer validate
- composer require --no-update silverstripe/recipe-cms:1.1.x-dev
- composer require --no-update silverstripe/recipe-testing:^1 silverstripe/recipe-cms:1.1.x-dev
- 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
# Install NPM dependencies
@ -58,8 +62,9 @@ before_script:
# Start behat services
- 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 (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
script:

View File

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

View File

@ -585,6 +585,14 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'listViewLink' => $this->LinkListViewChildren($node->ID),
'rootTitle' => $rootTitle,
'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"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"silverstripe/behat-extension": "^3@dev",
"silverstripe/serve": "^2",
"se/selenium-server-standalone": "2.41.0"
"phpunit/phpunit": "^5.7"
},
"extra": {
"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>
<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>
</a>
$SubTree