diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-02 23:23:52 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-03-02 23:23:52 +0400 |
commit | 7345411d6a062b52d75a31d09db64cd1f4bb4063 (patch) | |
tree | 141e446a5031420888f45ccd7fc646cf5bc63ca3 /plugins | |
parent | c21379323d472d0e7e59d9fde106856c03dd17cd (diff) |
Fixing UI tests build:
- change idsite to idSite in Overlay URLs in piwik.js
- don't init top controls if top controls container can't be found
- add default parameter for $urls in SitesManager.setSiteAliasUrls so site alias URLs can be reset
- fix bugs in UI tests database setup (including moving dashboard setup to UITestFixture class & keeping outside of
setUp function so --persist-fixture-data will work in case the super user is deleted)
- Add queryParamOverride testingEnvironment variable.
- fix screenshot testing page renderer's method of waiting for CSS images
- add margin bottom & left for widgetized controls for tests
- add diagnostics to upload_artifacts.sh script
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/javascripts/top_controls.js | 25 | ||||
-rw-r--r-- | plugins/DBStats/tests/UI/expected-ui-screenshots/DBStats_admin_page.png | bin | 312771 -> 198182 bytes | |||
-rw-r--r-- | plugins/SitesManager/API.php | 4 |
3 files changed, 16 insertions, 13 deletions
diff --git a/plugins/CoreHome/javascripts/top_controls.js b/plugins/CoreHome/javascripts/top_controls.js index c2089648d0..21f3c41fc6 100644 --- a/plugins/CoreHome/javascripts/top_controls.js +++ b/plugins/CoreHome/javascripts/top_controls.js @@ -7,18 +7,21 @@ function initTopControls() { var $topControlsContainer = $('.top_controls'), left = 0; - $('.piwikTopControl').each(function () { - var $control = $(this); - if ($control.css('display') == 'none') { - return; - } + + if ($topControlsContainer.length) { + $('.piwikTopControl').each(function () { + var $control = $(this); + if ($control.css('display') == 'none') { + return; + } - $control.css('left', left); + $control.css('left', left); - if (!$.contains($topControlsContainer[0], this)) { - $control.detach().appendTo($topControlsContainer); - } + if (!$.contains($topControlsContainer[0], this)) { + $control.detach().appendTo($topControlsContainer); + } - left += $control.outerWidth(true); - }); + left += $control.outerWidth(true); + }); + } }
\ No newline at end of file diff --git a/plugins/DBStats/tests/UI/expected-ui-screenshots/DBStats_admin_page.png b/plugins/DBStats/tests/UI/expected-ui-screenshots/DBStats_admin_page.png Binary files differindex 6d1e0ba667..86e8c4e5c5 100644 --- a/plugins/DBStats/tests/UI/expected-ui-screenshots/DBStats_admin_page.png +++ b/plugins/DBStats/tests/UI/expected-ui-screenshots/DBStats_admin_page.png diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php index 1eeb47ffca..1239c50489 100644 --- a/plugins/SitesManager/API.php +++ b/plugins/SitesManager/API.php @@ -727,14 +727,14 @@ class API extends \Piwik\Plugin\API * * @return int the number of inserted URLs */ - public function setSiteAliasUrls($idSite, $urls) + public function setSiteAliasUrls($idSite, $urls = array()) { Piwik::checkUserHasAdminAccess($idSite); $urls = $this->cleanParameterUrls($urls); $this->checkUrls($urls); - $this->deleteSiteAliasUrls($idSite); + $this->deleteSiteAliasUrls($idSite); $this->insertSiteUrls($idSite, $urls); $this->postUpdateWebsite($idSite); |