diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-07-10 22:44:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-10 22:44:52 +0300 |
commit | 4b88aa24c9c85c45340ca854c812c21014d86dc2 (patch) | |
tree | e1f279d3d4faa5d3ac00a523dff360e9abec3fe0 /tests | |
parent | a4c01fe919de7c5696e3c06d2c066085e08ec255 (diff) |
Disables some more feature if internet features are disabled (#13076)
* Disable GeoIP update tasks if no internet connection available
* Show GeoLocation Auto Updater UI only with enabled internet connection
* Throw exception if Marketplace is used without enabled internet features
* Hide Marketplace menu entry if internet is disabled
* Implements new plugin class method requiresInternetConnection, to automatically unloaded plugins if required
* Improve how plugins not working without internet connection are shown in plugin list
* Adds UI test
* typo 'whether'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png | 3 | ||||
-rw-r--r-- | tests/UI/specs/UIIntegration_spec.js | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png new file mode 100644 index 0000000000..a39c085936 --- /dev/null +++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c91ea1df0d14cedc89eb0a76aac1a08a0619657b0b8353b68d9ece8a186b826 +size 1026600 diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js index 4321882870..2100dfad4a 100644 --- a/tests/UI/specs/UIIntegration_spec.js +++ b/tests/UI/specs/UIIntegration_spec.js @@ -33,6 +33,9 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? if (testEnvironment.configOverride.database) { delete testEnvironment.configOverride.database; } + if (testEnvironment.configOverride.General) { + delete testEnvironment.configOverride.General; + } testEnvironment.testUseMockAuth = 1; testEnvironment.save(); }); @@ -551,6 +554,17 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? }, done); }); + it('should load the plugins admin page correctly', function (done) { + testEnvironment.overrideConfig('General', { + enable_internet_features: 0 + }); + testEnvironment.save(); + + expect.screenshot('admin_plugins_no_internet').to.be.captureSelector('.pageWrap', function (page) { + page.load("?" + generalParams + "&module=CorePluginsAdmin&action=plugins"); + }, done); + }); + it('should load the config file page correctly', function (done) { expect.screenshot('admin_diagnostics_configfile').to.be.captureSelector('.pageWrap', function (page) { page.load("?" + generalParams + "&module=Diagnostics&action=configfile"); |