From e554e82afae5493c9cf43af65fb3ee42f5670498 Mon Sep 17 00:00:00 2001 From: Jason Korth Date: Mon, 9 Apr 2018 11:11:29 -0500 Subject: [PATCH 1/3] adjustment to show Page Type title on SiteTree mouseover --- code/Controllers/CMSMain.php | 6 ++++++ .../CMS/Controllers/Includes/CMSMain_TreeNode.ss | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index d8037e6f..ccddd400 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -529,6 +529,12 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr 'listViewLink' => $this->LinkListViewChildren($node->ID), 'rootTitle' => $rootTitle, 'extraClass' => $this->getTreeNodeClasses($node), + 'Title' => sprintf( + '(%s: %s) %s', + trim(_t('SilverStripe\Admin\LeftAndMain.PAGETYPE', 'Page type'), ' :'), + $node->i18n_singular_name(), + $node->Title + ) ]; }; } diff --git a/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeNode.ss b/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeNode.ss index 76ef1fe6..667b2d87 100644 --- a/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeNode.ss +++ b/templates/SilverStripe/CMS/Controllers/Includes/CMSMain_TreeNode.ss @@ -1,5 +1,5 @@
  •   -   +   {$node.TreeTitle} $SubTree From 87d69ba75366ff63563e5b9b159fb643daa4f1d7 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Tue, 10 Apr 2018 10:30:49 +1200 Subject: [PATCH 2/3] ENHANCEMENT Use i18n template for page tree title --- code/Controllers/CMSMain.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index ccddd400..a32edf3f 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -529,11 +529,13 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr 'listViewLink' => $this->LinkListViewChildren($node->ID), 'rootTitle' => $rootTitle, 'extraClass' => $this->getTreeNodeClasses($node), - 'Title' => sprintf( - '(%s: %s) %s', - trim(_t('SilverStripe\Admin\LeftAndMain.PAGETYPE', 'Page type'), ' :'), - $node->i18n_singular_name(), - $node->Title + 'Title' => _t( + self::class . '.PAGETYPE_TITLE', + '(Page type: {type}) {title}', + [ + 'type' => $node->i18n_singular_name(), + 'title' => $node->Title, + ] ) ]; }; From 796d69c72e7f4aaba4d70a489f71f7611a7ba0b3 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 12 Apr 2018 16:06:49 +1200 Subject: [PATCH 3/3] Update selenium to chromedriver --- .travis.yml | 21 +++++++++++++-------- behat.yml | 10 ++++++---- composer.json | 5 +---- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1bd7c6b2..8ad78365 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,10 @@ language: php dist: trusty +before_install: + - sudo apt-get update + - sudo apt-get install chromium-chromedriver + cache: directories: - $HOME/.composer/cache/files @@ -10,7 +14,6 @@ addons: apt: packages: - tidy - firefox: "31.0" env: global: @@ -36,6 +39,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 @@ -44,20 +50,19 @@ before_script: # Install composer dependencies - composer validate - - composer install --prefer-dist - - composer require --prefer-dist --no-update silverstripe/recipe-cms:1.0.x-dev - - composer update - - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi - - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi - - if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi + - composer require silverstripe/recipe-testing:^1 silverstripe/recipe-cms 1.0.x-dev --no-update --prefer-dist + - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --no-update --prefer-dist; fi + - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --no-update --prefer-dist; fi + - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile # Install NPM dependencies - if [[ $NPM_TEST ]]; then nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && npm install -g yarn && yarn install --network-concurrency 1 && yarn run build; fi # 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: diff --git a/behat.yml b/behat.yml index a97aac9a..dba896d5 100644 --- a/behat.yml +++ b/behat.yml @@ -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 diff --git a/composer.json b/composer.json index a2c273cd..38dfbdfb 100644 --- a/composer.json +++ b/composer.json @@ -29,10 +29,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": { "expose": [