Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2018-03-30 23:56:02 +0300
committerGitHub <noreply@github.com>2018-03-30 23:56:02 +0300
commitda1fec50e51071c775278ac2b9c2eb5db7a20f2f (patch)
tree704e7d0ebe0477fe02c3ac9057e8bb67f27b079b /plugins
parent119e62cd5cc076396dd83736e402d4f470acadd8 (diff)
Moves various UI tests to their plugins (#12649)
* move Overlay UI tests to Overlay plugin * remove UI files that has been moved * move Login UI tests to Login plugin * check for element instead of comparing screenshots * Move Installation UI tests to it's plugin * Move UI tests for Marketplace to Marketplace plugin * Updates Sync Screenshots command to download test files to correct directories * ensure shortcut help is always tested with same useragent * Move VisitorMap UI tests to UserCountryMap plugin * Move Morpheus UI tests to plugin * Move MultiSites UI tests zu plugin * Move ActionsDataTable UI tests to Actions plugin * Renames Test directories to tests * Move UsersManager UI tests to plugin * Move CoreUpdater UI tests to plugin * Move DBStats UI tests to plugin * Move Transitions UI tests to plugin * Move Insights UI tests to plugin * improve UI tests splitting on travis * Moves SegmentEditor UI tests to plugin * Moves SitesManager UI tests to plugin * Moves ImageGraph UI tests to plugin * move live ui test files to git lfs * remove retry * update test file * improve splitting for travis * prevent test from failing randomly
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Actions/tests/UI/ActionsDataTable_spec.js125
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png3
-rw-r--r--plugins/CoreUpdater/tests/Fixtures/DbUpdaterTestFixture.php (renamed from plugins/CoreUpdater/Test/Fixtures/DbUpdaterTestFixture.php)2
-rw-r--r--plugins/CoreUpdater/tests/Fixtures/FailUpdateHttpsFixture.php (renamed from plugins/CoreUpdater/Test/Fixtures/FailUpdateHttpsFixture.php)4
-rw-r--r--plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php (renamed from plugins/CoreUpdater/Test/Integration/Commands/UpdateTest.php)2
-rw-r--r--plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php (renamed from plugins/CoreUpdater/Test/Integration/ReleaseChannelTest.php)2
-rw-r--r--plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php (renamed from plugins/CoreUpdater/Test/Integration/UpdateCommunicationTest.php)2
-rw-r--r--plugins/CoreUpdater/tests/Mock/UpdaterMock.php (renamed from plugins/CoreUpdater/Test/Mock/UpdaterMock.php)2
-rw-r--r--plugins/CoreUpdater/tests/UI/CoreUpdaterCode_spec.js40
-rw-r--r--plugins/CoreUpdater/tests/UI/CoreUpdaterDb_spec.js73
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpUpdateSuccess.png3
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpsUpdateFail.png3
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_newVersion.png3
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt1
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt1
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt1
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt1
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt4
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main.png3
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png3
-rw-r--r--plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_updated.png3
-rw-r--r--plugins/CoreUpdater/tests/Unit/ModelTest.php (renamed from plugins/CoreUpdater/Test/Unit/ModelTest.php)2
-rw-r--r--plugins/DBStats/tests/UI/DBStats_spec.js20
-rw-r--r--plugins/DBStats/tests/UI/expected-screenshots/DBStats_admin_page.png3
-rw-r--r--plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php (renamed from plugins/Diagnostics/Test/Integration/Commands/AnalyzeArchiveTableTest.php)2
-rw-r--r--plugins/Diagnostics/tests/Integration/ConfigReaderTest.php (renamed from plugins/Diagnostics/Test/Integration/ConfigReaderTest.php)3
-rw-r--r--plugins/Diagnostics/tests/Mock/DiagnosticWithError.php (renamed from plugins/Diagnostics/Test/Mock/DiagnosticWithError.php)2
-rw-r--r--plugins/Diagnostics/tests/Mock/DiagnosticWithSuccess.php (renamed from plugins/Diagnostics/Test/Mock/DiagnosticWithSuccess.php)2
-rw-r--r--plugins/Diagnostics/tests/Mock/DiagnosticWithWarning.php (renamed from plugins/Diagnostics/Test/Mock/DiagnosticWithWarning.php)2
-rw-r--r--plugins/Diagnostics/tests/Unit/Diagnostic/DiagnosticResultTest.php (renamed from plugins/Diagnostics/Test/Unit/Diagnostic/DiagnosticResultTest.php)2
-rw-r--r--plugins/Diagnostics/tests/Unit/DiagnosticReportTest.php (renamed from plugins/Diagnostics/Test/Unit/DiagnosticReportTest.php)2
-rw-r--r--plugins/Diagnostics/tests/Unit/DiagnosticServiceTest.php (renamed from plugins/Diagnostics/Test/Unit/DiagnosticServiceTest.php)8
-rw-r--r--plugins/ImageGraph/tests/UI/ImageGraph_spec.js41
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png3
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png3
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png3
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png3
-rw-r--r--plugins/Insights/tests/UI/Insights_spec.js21
-rw-r--r--plugins/Insights/tests/UI/expected-screenshots/Insights_initial.png3
-rw-r--r--plugins/Installation/tests/UI/Installation_spec.js181
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_access_no_config.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_congrats.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_db_created.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup_fail.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_nothing_to_see_here.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website_fail.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_start.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_superuser.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_de.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_fail.png3
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png3
-rw-r--r--[-rwxr-xr-x]plugins/LanguagesManager/tests/Integration/LanguagesManagerTest.php (renamed from plugins/LanguagesManager/Test/Integration/LanguagesManagerTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Integration/ModelTest.php (renamed from plugins/LanguagesManager/Test/Integration/ModelTest.php)0
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/ByBaseTranslationsTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/ByBaseTranslationsTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/ByParameterCountTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/ByParameterCountTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/EmptyTranslationsTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/EmptyTranslationsTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/EncodedEntitiesTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/EncodedEntitiesTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/UnnecassaryWhitespacesTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/UnnecassaryWhitespacesTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Validate/CoreTranslationsTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Validate/CoreTranslationsTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/Validate/NoScriptsTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/Validate/NoScriptsTest.php)2
-rw-r--r--plugins/LanguagesManager/tests/Unit/TranslationWriter/WriterTest.php (renamed from plugins/LanguagesManager/Test/Unit/TranslationWriter/WriterTest.php)2
-rw-r--r--plugins/Live/tests/UI/Live_spec.js2
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_log.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_expand_actions.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_purged.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_details.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_tooltip.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_actions_hidden.png3
-rw-r--r--plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_visit_details.png3
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log.pngbin418228 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_expand_actions.pngbin52278 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_purged.pngbin22341 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile.pngbin435393 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_details.pngbin294925 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_tooltip.pngbin11399 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_actions_hidden.pngbin261019 -> 0 bytes
-rw-r--r--plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_visit_details.pngbin271089 -> 0 bytes
-rw-r--r--plugins/Login/tests/UI/Login_spec.js122
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_login_form.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_logout_form.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png3
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png3
-rw-r--r--plugins/Marketplace/tests/UI/Marketplace_spec.js265
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_exceededLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_expiredLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_noLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_multiUserEnvironment_installed.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_superuser_installed.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_user_installed.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_exceededLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_expiredLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_noLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_validLicense.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_install_all_paid_plugins_at_once.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmation.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_multiUserEnvironment.png3
-rw-r--r--plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_superuser.png3
-rw-r--r--plugins/Morpheus/tests/UI/Morpheus_spec.js24
-rw-r--r--plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png3
-rw-r--r--plugins/MultiSites/tests/UI/MultiSites_spec.js72
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png3
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png3
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png3
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png3
-rw-r--r--plugins/Overlay/tests/UI/Overlay_spec.js138
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_change.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_link_clicks.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_new_links.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_period_change.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_row_evolution.png3
-rw-r--r--plugins/Overlay/tests/UI/expected-screenshots/Overlay_transitions.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js229
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_0_initial.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_different.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_7_segment_editor_closed.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_8_segment_editor_create.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_and_condition.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_or_condition.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_reload.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_update_confirmation.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png3
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png3
-rw-r--r--plugins/SitesManager/tests/UI/SitesManager_spec.js88
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_global_settings.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_loaded.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1_again.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_2.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_no_result.png3
-rw-r--r--plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_page_1.png3
-rw-r--r--plugins/TestRunner/Commands/SyncScreenshots.php26
-rw-r--r--plugins/Transitions/tests/UI/Transitions_spec.js34
-rw-r--r--plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_titles.png3
-rw-r--r--plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png3
-rw-r--r--plugins/UserCountry/tests/System/AttributeHistoricalDataWithLocationsTest.php2
-rw-r--r--plugins/UserCountryMap/tests/UI/VisitorMap_spec.js60
-rw-r--r--plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_avg_time_on_site.png3
-rw-r--r--plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_bounce_rate.png3
-rw-r--r--plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png3
-rw-r--r--plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png3
-rw-r--r--plugins/UsersManager/tests/UI/UsersManager_spec.js110
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_confirmation.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_loaded.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_form_opened.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_no_user_entered.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_already_has_access.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_not_found.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_email.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_login.png3
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_loaded_as_admin.png3
214 files changed, 2170 insertions, 36 deletions
diff --git a/plugins/Actions/tests/UI/ActionsDataTable_spec.js b/plugins/Actions/tests/UI/ActionsDataTable_spec.js
new file mode 100644
index 0000000000..7ee45bfbc5
--- /dev/null
+++ b/plugins/Actions/tests/UI/ActionsDataTable_spec.js
@@ -0,0 +1,125 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * ActionsDataTable screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("ActionsDataTable", function () {
+ this.timeout(0);
+
+ var url = "?module=Widgetize&action=iframe&idSite=1&period=year&date=2012-08-09&moduleToWidgetize=Actions&actionToWidgetize=getPageUrls&isFooterExpandedInDashboard=1";
+
+ it("should load correctly", function (done) {
+ expect.screenshot('initial').to.be.capture(function (page) {
+ page.load(url);
+ }, done);
+ });
+
+ it("should sort column correctly when column header clicked", function (done) {
+ expect.screenshot('column_sorted').to.be.capture(function (page) {
+ page.click('th#avg_time_on_page', 3000);
+ }, done);
+ });
+
+ it("should load subtables correctly when row clicked", function (done) {
+ expect.screenshot('subtables_loaded').to.be.capture(function (page) {
+ page.evaluate(function(){
+ $('tr.subDataTable:first').click();
+ $('tr.subDataTable:eq(2)').click();
+ });
+ }, done);
+ });
+
+ it("should show configuration options", function (done) {
+ expect.screenshot('configuration_options').to.be.captureSelector('.tableConfiguration', function (page) {
+ page.click('.dropdownConfigureIcon');
+ }, done);
+ });
+
+ it("should flatten table when flatten link clicked", function (done) {
+ expect.screenshot('flattened').to.be.capture(function (page) {
+ page.click('.dataTableFlatten');
+ }, done);
+ });
+
+ it("should exclude low population rows when exclude low population link clicked", function (done) {
+ expect.screenshot('exclude_low_population').to.be.capture(function (page) {
+ page.click('.dropdownConfigureIcon');
+ page.click('.dataTableExcludeLowPopulation');
+ }, done);
+ });
+
+ it("should load normal view when switch to view hierarchical view link is clicked", function (done) {
+ expect.screenshot('unflattened').to.be.capture(function (page) {
+ page.click('.dropdownConfigureIcon span');
+ page.click('.dataTableFlatten');
+ }, done);
+ });
+
+ it("should display pageview percentages when hovering over pageviews column", function (done) {
+ this.retries(3);
+ expect.screenshot('pageview_percentages').to.be.capture(function (page) {
+ page.mouseMove('tr:contains("thankyou") td.column:eq(1)');
+ page.wait(1000);
+ }, done);
+ });
+
+ it("should generate a proper title for the visitor log segmented by the current row", function (done) {
+ this.retries(3);
+ expect.screenshot('segmented_visitor_log_hover').to.be.capture(function (page) {
+ var row = 'tr:contains("thankyou") ';
+ page.mouseMove(row + 'td.column:first');
+ page.mouseMove(row + 'td.label .actionSegmentVisitorLog');
+ page.wait(1000);
+ }, done);
+ });
+
+ it("should open the visitor log segmented by the current row", function (done) {
+ expect.screenshot('segmented_visitor_log').to.be.captureSelector('.ui-dialog', function (page) {
+ page.evaluate(function(){
+ $('tr:contains("thankyou") td.label .actionSegmentVisitorLog').click();
+ }, 3000);
+ }, done);
+ });
+
+ it("should display unique pageview percentages when hovering over unique pageviews column", function (done) {
+ this.retries(3);
+ expect.screenshot('unique_pageview_percentages').to.be.capture(function (page) {
+ page.click('.ui-widget .ui-dialog-titlebar-close');
+
+ page.mouseMove('tr:contains("thankyou") td.column:eq(2)');
+ page.wait(1000);
+ }, done);
+ });
+
+ it("should show the search when clicking on the search icon", function (done) {
+ expect.screenshot('search_visible').to.be.capture(function (page) {
+ page.click('.dataTableAction.searchAction');
+ }, done);
+ });
+
+ it("should search through table when search input entered and search button clicked and input should be visible", function (done) {
+ expect.screenshot('search').to.be.capture(function (page) {
+ page.sendKeys('.searchAction .dataTableSearchInput', 'i');
+ page.click('.searchAction .icon-search', 1500);
+ page.mouseMove('#logo', 100);
+ }, done);
+ });
+
+ it("should close search when clicking on the x icon", function (done) {
+ expect.screenshot('search_closed').to.be.capture(function (page) {
+ page.click('.searchAction .icon-close');
+ }, done);
+ });
+
+ it("should automatically expand subtables if it contains only one folder", function (done) {
+ expect.screenshot('auto_expand').to.be.capture(function (page) {
+ page.load(url + '&viewDataTable=table');
+ page.click('tr .value:contains("blog")');
+ page.click('tr .value:contains("2012")');
+ }, done);
+ });
+});
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png
new file mode 100644
index 0000000000..ed4623c453
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2bafb7590170d13adf50e652f85f5a9c916fe8d9f6c4ee95e3e90547b817524c
+size 377310
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png
new file mode 100644
index 0000000000..ba7ab2fd13
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0e2f7637aa4f0f22570ba6809e3738bb26755165b0dabd9b13dfa7d4465f012
+size 352618
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png
new file mode 100644
index 0000000000..a7a5aff93d
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1bb1ae2f7cfc4c0b8fdf58e76a5a2f1be30a88a7b00d71e7d3298b1844e30cbf
+size 7589
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
new file mode 100644
index 0000000000..4a3e03d153
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:288e98c77eb4f4ff40d175260de216f82afa50032a1d4f4b095f5e238c5559cc
+size 79542
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
new file mode 100644
index 0000000000..8fb04a3e91
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6b236609a19e3710137cf38fc73c660b730746492001add90cc59d66d7c95b0
+size 478557
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png
new file mode 100644
index 0000000000..e32e283c0c
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:adfd031e477ed8e76e72d0d6ea2774b534dd118c501b13a8c6e82d8d425ebb29
+size 352012
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png
new file mode 100644
index 0000000000..eae235c336
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:99b4dc5d20badb210aa7995d60d36c018b1a371fc46f1b03483eb236cc242354
+size 71291
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png
new file mode 100644
index 0000000000..e717a0d14d
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59288cfeb15c12178d884707cc7ef136a2a47a723b77fbc90cbda1021460c9c7
+size 84535
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png
new file mode 100644
index 0000000000..81965eee95
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c5671d5423773312e8f6ad4ec1bd7aeb5363c7aaebf1f71da4bcbefb6cc0e9d
+size 63264
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png
new file mode 100644
index 0000000000..48a7bcf3e6
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca56eddb117fb27c2a27a419c8d8f3c41490ac9e5cc7425cb4a5dbbf00d43c22
+size 63782
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png
new file mode 100644
index 0000000000..712c4740b8
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5a949e61f2b9d00a0c0af95755d2113e047d9345ed95a76a3bd08eec5b200185
+size 424489
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png
new file mode 100644
index 0000000000..09cf131436
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6d21a7cb9d45bad644cfc1ea8ffd9f8e9cbf8330da9473eacde846d3c569f948
+size 70730
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png
new file mode 100644
index 0000000000..0f02b60613
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b9c877245bd20f4a67f7f3ef2b3d3e48d8a94d048136842014d99b42e7371a23
+size 382648
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
new file mode 100644
index 0000000000..81965eee95
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c5671d5423773312e8f6ad4ec1bd7aeb5363c7aaebf1f71da4bcbefb6cc0e9d
+size 63264
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png
new file mode 100644
index 0000000000..60522aac93
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:55a8bb4bebacbe5ca1b288a7b38a13c69469f6d0e016f5a6a5a5e1f8709e6f2e
+size 71279
diff --git a/plugins/CoreUpdater/Test/Fixtures/DbUpdaterTestFixture.php b/plugins/CoreUpdater/tests/Fixtures/DbUpdaterTestFixture.php
index 89a29126f2..b429e8c3ba 100644
--- a/plugins/CoreUpdater/Test/Fixtures/DbUpdaterTestFixture.php
+++ b/plugins/CoreUpdater/tests/Fixtures/DbUpdaterTestFixture.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test\Fixtures;
+namespace Piwik\Plugins\CoreUpdater\tests\Fixtures;
use Piwik\Tests\Fixtures\SqlDump;
diff --git a/plugins/CoreUpdater/Test/Fixtures/FailUpdateHttpsFixture.php b/plugins/CoreUpdater/tests/Fixtures/FailUpdateHttpsFixture.php
index 5060c99320..84e0cbb295 100644
--- a/plugins/CoreUpdater/Test/Fixtures/FailUpdateHttpsFixture.php
+++ b/plugins/CoreUpdater/tests/Fixtures/FailUpdateHttpsFixture.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test\Fixtures;
+namespace Piwik\Plugins\CoreUpdater\tests\Fixtures;
use Piwik\Tests\Framework\Fixture;
@@ -18,7 +18,7 @@ class FailUpdateHttpsFixture extends Fixture
public function provideContainerConfig()
{
return array(
- 'Piwik\Plugins\CoreUpdater\Updater' => \DI\object('Piwik\Plugins\CoreUpdater\Test\Mock\UpdaterMock'),
+ 'Piwik\Plugins\CoreUpdater\Updater' => \DI\object('Piwik\Plugins\CoreUpdater\tests\Mock\UpdaterMock'),
);
}
}
diff --git a/plugins/CoreUpdater/Test/Integration/Commands/UpdateTest.php b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
index d1714c162f..bfb35380c5 100644
--- a/plugins/CoreUpdater/Test/Integration/Commands/UpdateTest.php
+++ b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
@@ -5,7 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test\Integration\Commands;
+namespace Piwik\Plugins\CoreUpdater\tests\Integration\Commands;
use Piwik\Config;
use Piwik\DataAccess\ArchiveTableCreator;
diff --git a/plugins/CoreUpdater/Test/Integration/ReleaseChannelTest.php b/plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php
index f26cec94de..ef44893a14 100644
--- a/plugins/CoreUpdater/Test/Integration/ReleaseChannelTest.php
+++ b/plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test\ReleaseChannel;
+namespace Piwik\Plugins\CoreUpdater\tests\ReleaseChannel;
use Piwik\Config;
use Piwik\Db;
diff --git a/plugins/CoreUpdater/Test/Integration/UpdateCommunicationTest.php b/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
index b031538134..32fe27be37 100644
--- a/plugins/CoreUpdater/Test/Integration/UpdateCommunicationTest.php
+++ b/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test;
+namespace Piwik\Plugins\CoreUpdater\tests\Integration;
use Piwik\Config;
use Piwik\Option;
diff --git a/plugins/CoreUpdater/Test/Mock/UpdaterMock.php b/plugins/CoreUpdater/tests/Mock/UpdaterMock.php
index d0089e08fb..9fc225c6a9 100644
--- a/plugins/CoreUpdater/Test/Mock/UpdaterMock.php
+++ b/plugins/CoreUpdater/tests/Mock/UpdaterMock.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test\Mock;
+namespace Piwik\Plugins\CoreUpdater\tests\Mock;
use Piwik\Plugins\CoreUpdater\ArchiveDownloadException;
use Piwik\Plugins\CoreUpdater\Updater;
diff --git a/plugins/CoreUpdater/tests/UI/CoreUpdaterCode_spec.js b/plugins/CoreUpdater/tests/UI/CoreUpdaterCode_spec.js
new file mode 100644
index 0000000000..70b55dbbe9
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/CoreUpdaterCode_spec.js
@@ -0,0 +1,40 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * CoreUpdater screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("CoreUpdaterCode", function () {
+ this.timeout(0);
+
+ this.fixture = "Piwik\\Plugins\\CoreUpdater\\tests\\Fixtures\\FailUpdateHttpsFixture";
+
+ var url = "?module=CoreUpdater&action=newVersionAvailable";
+
+ it("should show a new version is available", function (done) {
+ expect.screenshot("newVersion").to.be.capture(function (page) {
+ page.load(url);
+ }, done);
+ });
+
+ it("should offer to retry using https when updating over https fails", function (done) {
+ expect.screenshot("httpsUpdateFail").to.be.capture(function (page) {
+ page.click('#updateAutomatically');
+ }, done);
+ });
+
+ it("should offer to retry over http when updating over https fails", function (done) {
+ expect.screenshot("httpsUpdateFail").to.be.capture(function (page) {
+ page.click('#updateUsingHttps');
+ }, done);
+ });
+
+ it("should show the update steps when updating over http succeeds", function (done) {
+ expect.screenshot("httpUpdateSuccess").to.be.capture(function (page) {
+ page.click('#updateUsingHttp');
+ }, done);
+ });
+});
diff --git a/plugins/CoreUpdater/tests/UI/CoreUpdaterDb_spec.js b/plugins/CoreUpdater/tests/UI/CoreUpdaterDb_spec.js
new file mode 100644
index 0000000000..3fb5595c78
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/CoreUpdaterDb_spec.js
@@ -0,0 +1,73 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * CoreUpdater screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("CoreUpdaterDb", function () {
+ this.timeout(0);
+
+ this.fixture = "Piwik\\Plugins\\CoreUpdater\\tests\\Fixtures\\DbUpdaterTestFixture";
+
+ before(function () {
+ testEnvironment.tablesPrefix = 'piwik_';
+ testEnvironment.save();
+ });
+
+ after(function () {
+ if (testEnvironment.configOverride.General) {
+ delete testEnvironment.configOverride.General;
+ testEnvironment.save();
+ }
+ });
+
+ function apiUpgradeTest(format) {
+ it("should start the updater when an old version of Piwik is detected in the DB with format " + format, function (done) {
+ expect.file('CoreUpdater.API.ErrorMessage' + format + '.txt').to.be.pageContents(function (page) {
+ page.load('');
+ page.downloadUrl('?module=API&method=API.getPiwikVersion&format=' + format);
+ }, done);
+ });
+ }
+
+ var formats = ['CSV', 'TSV', 'XML', 'JSON', 'PHP'];
+ formats.forEach(apiUpgradeTest);
+
+ it("should start the updater when an old version of Piwik is detected in the DB", function (done) {
+ expect.screenshot("main").to.be.capture(function (page) {
+ page.load("");
+ page.evaluate(function () {
+ $('p').each(function () {
+ var replace = $(this).html().replace(/(?!1\.0)\d+\.\d+(\.\d+)?([\-a-z]*\d+)?/g, '');
+ $(this).html(replace);
+ });
+ });
+ }, done);
+ });
+
+ it("should show instance id in updating screen", function (done) {
+ expect.screenshot("main_instance").to.be.capture(function (page) {
+ testEnvironment.configOverride.General = {
+ instance_id: 'custom.instance'
+ };
+ testEnvironment.save();
+
+ page.load("");
+ page.evaluate(function () {
+ $('p').each(function () {
+ var replace = $(this).html().replace(/(?!1\.0)\d+\.\d+(\.\d+)?([\-a-z]*\d+)?/g, '');
+ $(this).html(replace);
+ });
+ });
+ }, done);
+ });
+
+ it("should show the donation form when the update process is complete", function (done) {
+ expect.screenshot("updated").to.be.capture(function (page) {
+ page.click('.btn');
+ }, done);
+ });
+});
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpUpdateSuccess.png b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpUpdateSuccess.png
new file mode 100644
index 0000000000..ff513457b3
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpUpdateSuccess.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4db939009ddbe279435cf80ed72a8a1acd175355d425f1b6e82deb7789a7ce76
+size 249903
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpsUpdateFail.png b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpsUpdateFail.png
new file mode 100644
index 0000000000..7b58609985
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_httpsUpdateFail.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d755cfe552ce94d02ba140cf1eee53714161de9423c210b0dfa4563ff45d7441
+size 99420
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_newVersion.png b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_newVersion.png
new file mode 100644
index 0000000000..e82dad6f88
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterCode_newVersion.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:15f8c9d337cc24d3a8359c2e9c15ca47ca7e4494534920151b4f709ad0c4be20
+size 107457
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt
new file mode 100644
index 0000000000..9197a7572d
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageCSV.txt
@@ -0,0 +1 @@
+Error: Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue. \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt
new file mode 100644
index 0000000000..75d504da6a
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageJSON.txt
@@ -0,0 +1 @@
+{"result":"error","message":"Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue."} \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt
new file mode 100644
index 0000000000..5834ed03de
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessagePHP.txt
@@ -0,0 +1 @@
+a:2:{s:6:"result";s:5:"error";s:7:"message";s:108:"Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue.";} \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt
new file mode 100644
index 0000000000..9197a7572d
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageTSV.txt
@@ -0,0 +1 @@
+Error: Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue. \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt
new file mode 100644
index 0000000000..b929a52c5b
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_CoreUpdater.API.ErrorMessageXML.txt
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <error message="Database Upgrade Required. Your Piwik database is out-of-date, and must be upgraded before you can continue." />
+</result> \ No newline at end of file
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main.png b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main.png
new file mode 100644
index 0000000000..ed4adbaf16
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1b0bfd4d3ec4fd14498f36ecd1cf165678d3be20c7efe4c5fbde1c3ff2159f05
+size 291686
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png
new file mode 100644
index 0000000000..cce429a7af
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4efe2adfb1ef239484205308d1fe18d49ff197a9c7d0ea5cb70806d08107abf2
+size 293857
diff --git a/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_updated.png b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_updated.png
new file mode 100644
index 0000000000..2fd0cf099a
--- /dev/null
+++ b/plugins/CoreUpdater/tests/UI/expected-screenshots/CoreUpdaterDb_updated.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cdf0a63d39eef87e735f0139832b5e2ee97de6f6c9fbd9835f8ce44e973dbe81
+size 78199
diff --git a/plugins/CoreUpdater/Test/Unit/ModelTest.php b/plugins/CoreUpdater/tests/Unit/ModelTest.php
index 521aa8fc35..e488c4ffb4 100644
--- a/plugins/CoreUpdater/Test/Unit/ModelTest.php
+++ b/plugins/CoreUpdater/tests/Unit/ModelTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\CoreUpdater\Test\Unit;
+namespace Piwik\Plugins\CoreUpdater\tests\Unit;
use Piwik\Plugins\CoreUpdater\Model;
diff --git a/plugins/DBStats/tests/UI/DBStats_spec.js b/plugins/DBStats/tests/UI/DBStats_spec.js
new file mode 100644
index 0000000000..11ce66cffa
--- /dev/null
+++ b/plugins/DBStats/tests/UI/DBStats_spec.js
@@ -0,0 +1,20 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Screenshot tests for the DBStats plugin.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("DBStats", function () {
+ this.timeout(0);
+
+ var url = "?module=DBStats&action=index&idSite=1&period=day&date=yesterday";
+
+ it("should load correctly", function (done) {
+ expect.screenshot('admin_page').to.be.captureSelector('#content', function (page) {
+ page.load(url);
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/DBStats/tests/UI/expected-screenshots/DBStats_admin_page.png b/plugins/DBStats/tests/UI/expected-screenshots/DBStats_admin_page.png
new file mode 100644
index 0000000000..e2829b8d57
--- /dev/null
+++ b/plugins/DBStats/tests/UI/expected-screenshots/DBStats_admin_page.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:18ddb2399ccd6ad94c66effea650e2d02a190fa9d50d3b6fc577c16b07f28728
+size 230165
diff --git a/plugins/Diagnostics/Test/Integration/Commands/AnalyzeArchiveTableTest.php b/plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php
index 6202bd22af..383c9e80d7 100644
--- a/plugins/Diagnostics/Test/Integration/Commands/AnalyzeArchiveTableTest.php
+++ b/plugins/Diagnostics/tests/Integration/Commands/AnalyzeArchiveTableTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Integration\Commands;
+namespace Piwik\Plugins\Diagnostics\tests\Integration\Commands;
use Piwik\Tests\Fixtures\OneVisitorTwoVisits;
use Piwik\Tests\Framework\TestCase\ConsoleCommandTestCase;
diff --git a/plugins/Diagnostics/Test/Integration/ConfigReaderTest.php b/plugins/Diagnostics/tests/Integration/ConfigReaderTest.php
index 6634c4a38a..30f4e58b38 100644
--- a/plugins/Diagnostics/Test/Integration/ConfigReaderTest.php
+++ b/plugins/Diagnostics/tests/Integration/ConfigReaderTest.php
@@ -6,11 +6,10 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Integration\Commands;
+namespace Piwik\Plugins\Diagnostics\tests\Integration\Commands;
use Piwik\Application\Kernel\GlobalSettingsProvider;
use Piwik\Ini\IniReader;
-use Piwik\Piwik;
use Piwik\Plugins\Diagnostics\ConfigReader;
use Piwik\Plugins\ExampleSettingsPlugin\SystemSettings;
use Piwik\Settings\FieldConfig;
diff --git a/plugins/Diagnostics/Test/Mock/DiagnosticWithError.php b/plugins/Diagnostics/tests/Mock/DiagnosticWithError.php
index bc7d6db966..c5cc8e7b72 100644
--- a/plugins/Diagnostics/Test/Mock/DiagnosticWithError.php
+++ b/plugins/Diagnostics/tests/Mock/DiagnosticWithError.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Mock;
+namespace Piwik\Plugins\Diagnostics\tests\Mock;
use Piwik\Plugins\Diagnostics\Diagnostic\Diagnostic;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
diff --git a/plugins/Diagnostics/Test/Mock/DiagnosticWithSuccess.php b/plugins/Diagnostics/tests/Mock/DiagnosticWithSuccess.php
index ad01d95710..bc17f407ae 100644
--- a/plugins/Diagnostics/Test/Mock/DiagnosticWithSuccess.php
+++ b/plugins/Diagnostics/tests/Mock/DiagnosticWithSuccess.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Mock;
+namespace Piwik\Plugins\Diagnostics\tests\Mock;
use Piwik\Plugins\Diagnostics\Diagnostic\Diagnostic;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
diff --git a/plugins/Diagnostics/Test/Mock/DiagnosticWithWarning.php b/plugins/Diagnostics/tests/Mock/DiagnosticWithWarning.php
index a7e8915005..0234c05ea4 100644
--- a/plugins/Diagnostics/Test/Mock/DiagnosticWithWarning.php
+++ b/plugins/Diagnostics/tests/Mock/DiagnosticWithWarning.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Mock;
+namespace Piwik\Plugins\Diagnostics\tests\Mock;
use Piwik\Plugins\Diagnostics\Diagnostic\Diagnostic;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
diff --git a/plugins/Diagnostics/Test/Unit/Diagnostic/DiagnosticResultTest.php b/plugins/Diagnostics/tests/Unit/Diagnostic/DiagnosticResultTest.php
index efddeb74f2..3e3178417b 100644
--- a/plugins/Diagnostics/Test/Unit/Diagnostic/DiagnosticResultTest.php
+++ b/plugins/Diagnostics/tests/Unit/Diagnostic/DiagnosticResultTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Unit\Diagnostic;
+namespace Piwik\Plugins\Diagnostics\tests\Unit\Diagnostic;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResultItem;
diff --git a/plugins/Diagnostics/Test/Unit/DiagnosticReportTest.php b/plugins/Diagnostics/tests/Unit/DiagnosticReportTest.php
index bdd673b3c0..2d89d792bb 100644
--- a/plugins/Diagnostics/Test/Unit/DiagnosticReportTest.php
+++ b/plugins/Diagnostics/tests/Unit/DiagnosticReportTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Unit;
+namespace Piwik\Plugins\Diagnostics\tests\Unit;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
use Piwik\Plugins\Diagnostics\DiagnosticReport;
diff --git a/plugins/Diagnostics/Test/Unit/DiagnosticServiceTest.php b/plugins/Diagnostics/tests/Unit/DiagnosticServiceTest.php
index cfe11dcc8d..4faf8062e2 100644
--- a/plugins/Diagnostics/Test/Unit/DiagnosticServiceTest.php
+++ b/plugins/Diagnostics/tests/Unit/DiagnosticServiceTest.php
@@ -6,13 +6,13 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\Diagnostics\Test\Unit;
+namespace Piwik\Plugins\Diagnostics\tests\Unit;
use Piwik\Plugins\Diagnostics\Diagnostic\DiagnosticResult;
use Piwik\Plugins\Diagnostics\DiagnosticService;
-use Piwik\Plugins\Diagnostics\Test\Mock\DiagnosticWithError;
-use Piwik\Plugins\Diagnostics\Test\Mock\DiagnosticWithSuccess;
-use Piwik\Plugins\Diagnostics\Test\Mock\DiagnosticWithWarning;
+use Piwik\Plugins\Diagnostics\tests\Mock\DiagnosticWithError;
+use Piwik\Plugins\Diagnostics\tests\Mock\DiagnosticWithSuccess;
+use Piwik\Plugins\Diagnostics\tests\Mock\DiagnosticWithWarning;
class DiagnosticServiceTest extends \PHPUnit_Framework_TestCase
{
diff --git a/plugins/ImageGraph/tests/UI/ImageGraph_spec.js b/plugins/ImageGraph/tests/UI/ImageGraph_spec.js
new file mode 100644
index 0000000000..089e06b168
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/ImageGraph_spec.js
@@ -0,0 +1,41 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * ImageGraph plugin screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("ImageGraph", function () {
+ this.timeout(0);
+
+ function getImageGraphUrl(apiModule, apiAction, graphType, period, date) {
+ return "index.php?module=API&method=ImageGraph.get&idSite=1&width=500&height=250&apiModule=" + apiModule + "&apiAction=" + apiAction
+ + "&graphType=" + graphType + "&period=" + period + "&date=" + date;
+ }
+
+ it("should render evolution graphs correctly", function (done) {
+ expect.screenshot('evolution_graph').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('VisitsSummary', 'get', 'evolution', 'month', '2011-06-01,2012-06-01'));
+ }, done);
+ });
+
+ it("should render horizontal bar graphs correctly", function (done) {
+ expect.screenshot('horizontal_bar').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('UserSettings', 'getBrowser', 'horizontalBar', 'year', '2012-01-01'));
+ }, done);
+ });
+
+ it("should render vertical bar graphs correctly", function (done) {
+ expect.screenshot('vertical_bar').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('UserCountry', 'getCountry', 'verticalBar', 'year', '2012-01-01'));
+ }, done);
+ });
+
+ it("should render pie graphs correctly", function (done) {
+ expect.screenshot('pie').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('DevicesDetection', 'getOsVersions', 'pie', 'year', '2012-01-01'));
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png
new file mode 100644
index 0000000000..d0f8abe9d9
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9ba345b1629e2b4ba2fcbd00f893ad5b3a0fd0dcb2111ed6ba5a7fa6e8bcc64c
+size 11324
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png
new file mode 100644
index 0000000000..9e47bd6438
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e1f2130952eab4290e33548654633b5855539583c12a618fcc1226aa7d1424ce
+size 13748
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png
new file mode 100644
index 0000000000..e8d583ec8a
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c86bbbe8925d13fd67a03878bc91eec82966a3041250f1e4d9489aeb3cf9fbaf
+size 18970
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png
new file mode 100644
index 0000000000..e358ad8c0b
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d8772af7d359169027df85c15319612d4359a2607d672487b1cb4bed96a08db
+size 6302
diff --git a/plugins/Insights/tests/UI/Insights_spec.js b/plugins/Insights/tests/UI/Insights_spec.js
new file mode 100644
index 0000000000..eb4789f6d1
--- /dev/null
+++ b/plugins/Insights/tests/UI/Insights_spec.js
@@ -0,0 +1,21 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Insights screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("Insights", function () {
+ this.timeout(0);
+
+ var url = "?module=Widgetize&action=iframe&idSite=1&period=year&date=2012-08-09&moduleToWidgetize=Actions&actionToWidgetize=getPageUrls&isFooterExpandedInDashboard=1&viewDataTable=insightsVisualization";
+
+ it("should load correctly", function (done) {
+ expect.screenshot('initial').to.be.capture(function (page) {
+ page.load(url);
+ }, done);
+ });
+
+});
diff --git a/plugins/Insights/tests/UI/expected-screenshots/Insights_initial.png b/plugins/Insights/tests/UI/expected-screenshots/Insights_initial.png
new file mode 100644
index 0000000000..6aa24fc606
--- /dev/null
+++ b/plugins/Insights/tests/UI/expected-screenshots/Insights_initial.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d0d849e7426f94a1aff4bccb05453ce961465eb47e145882564b39943d97590a
+size 152855
diff --git a/plugins/Installation/tests/UI/Installation_spec.js b/plugins/Installation/tests/UI/Installation_spec.js
new file mode 100644
index 0000000000..c39cbdf5e6
--- /dev/null
+++ b/plugins/Installation/tests/UI/Installation_spec.js
@@ -0,0 +1,181 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Installation screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+var fs = require('fs');
+
+describe("Installation", function () {
+ this.timeout(0);
+
+ this.fixture = null;
+
+ before(function () {
+ testEnvironment.testUseMockAuth = 0;
+ testEnvironment.configFileLocal = path.join(PIWIK_INCLUDE_PATH, "/tmp/test.config.ini.php");
+ testEnvironment.dontUseTestConfig = true;
+ testEnvironment.tablesPrefix = 'piwik_';
+ testEnvironment.save();
+
+ if (fs.exists(testEnvironment.configFileLocal)) {
+ fs.remove(testEnvironment.configFileLocal);
+ }
+ });
+
+ after(function () {
+ delete testEnvironment.configFileLocal;
+ delete testEnvironment.dontUseTestConfig;
+ delete testEnvironment.tablesPrefix;
+ delete testEnvironment.testUseMockAuth;
+ testEnvironment.save();
+ });
+
+ it("should display an error message when trying to access a resource w/o a config.ini.php file", function (done) {
+ expect.screenshot("access_no_config").to.be.capture(function (page) {
+ page.load("?module=CoreHome&action=index&ignoreClearAllViewDataTableParameters=1");
+
+ page.evaluate(function () {
+ // ensure screenshots are reporting travis config file for comparison
+ // no jQuery existing on these error pages...
+ document.body.innerHTML = document.body.innerHTML.replace(
+ /{\/.*\/test\.config\.ini\.php}/,
+ '{/home/travis/build/piwik/piwik/tests/lib/screenshot-testing/../../../tmp/test.config.ini.php}'
+ );
+ });
+ }, done);
+ });
+
+ it("should start the installation process when the index is visited w/o a config.ini.php file", function (done) {
+ expect.screenshot("start").to.be.capture(function (page) {
+ page.load("?ignoreClearAllViewDataTableParameters=1");
+ }, done);
+ });
+
+ it("should display the system check page when next is clicked on the first page", function (done) {
+ expect.screenshot("system_check").to.be.capture(function (page) {
+ page.click('.next-step .btn');
+ }, done);
+ });
+
+ var pageUrl;
+ it("should have already created a tmp/sessions/index.htm file to prevent directory listing", function (done) {
+ expect.screenshot('nothing_to_see_here').to.be.capture(function (page) {
+ pageUrl = page.getCurrentUrl();
+
+ // page.load will load by default the proxy ie. http://localhost/piwik/tests/PHPUnit/proxy/
+ // but we need here to check in: http://localhost/piwik/tmp/sessions/
+ page.load("../../../tmp/sessions/index.htm");
+
+ }, done);
+ });
+
+ it("should display the database setup page when next is clicked on the system check page", function (done) {
+ expect.screenshot("db_setup").to.be.capture(function (page) {
+ page.load(pageUrl);
+
+ page.click('.next-step .btn');
+ }, done);
+ });
+
+ it("should fail when the next button is clicked and no database info is entered in the form", function (done) {
+ expect.screenshot("db_setup_fail").to.be.capture(function (page) {
+ page.click('.btn');
+ }, done);
+ });
+
+ it("should display the tables created page when next is clicked on the db setup page w/ correct info entered in the form", function (done) {
+ expect.screenshot("db_created").to.be.capture(function (page) {
+ var dbInfo = testEnvironment.readDbInfoFromConfig();
+ var username = dbInfo.username;
+ var password = dbInfo.password;
+
+ page.sendKeys('input[name=username]', username);
+
+ if (password) {
+ page.sendKeys('input[name=password]', password);
+ }
+
+ page.sendKeys('input[name=dbname]', 'newdb');
+ page.click('.btn');
+ }, done);
+ });
+
+ it("should display the superuser configuration page when next is clicked on the tables created page", function (done) {
+ expect.screenshot("superuser").to.be.capture(function (page) {
+ page.click('.next-step .btn');
+ }, done);
+ });
+
+ var pageUrl, pageUrlDe;
+
+ it("should un-select Professional Services newsletter checkbox when language is German", function (done) {
+ expect.screenshot("superuser_de").to.be.capture(function (page) {
+ pageUrl = page.getCurrentUrl();
+ pageUrlDe = pageUrl + '&language=de'
+ page.load(pageUrlDe);
+ }, done);
+ });
+
+ it("should fail when incorrect information is entered in the superuser configuration page", function (done) {
+ expect.screenshot("superuser_fail").to.be.capture(function (page) {
+ page.load(pageUrl);
+ page.click('.btn');
+ }, done);
+ });
+
+ it("should display the setup a website page when next is clicked on the filled out superuser config page", function (done) {
+ expect.screenshot("setup_website").to.be.capture(function (page) {
+ page.sendKeys('input[name=login]', 'thesuperuser');
+ page.sendKeys('input[name=password]', 'thepassword');
+ page.sendKeys('input[name=password_bis]', 'thepassword');
+ page.sendKeys('input[name=email]', 'hello@piwik.org');
+ page.click('.btn');
+ page.wait(3000);
+ }, done);
+ });
+
+ it("should should fail when incorrect information is entered in the setup a website page", function (done) {
+ expect.screenshot("setup_website_fail").to.be.capture(function (page) {
+ page.click('.btn');
+ }, done);
+ });
+
+ it("should display the javascript tracking page when correct information is entered in the setup website page and next is clicked", function (done) {
+ expect.screenshot("js_tracking").to.be.capture(function (page) {
+ page.sendKeys('input[name=siteName]', 'Serenity');
+ page.evaluate(function () {
+ // cannot use sendKeys since quickform does not use placeholder attribute
+ $('input[name=url]').val('serenity.com');
+
+ $('select[name=timezone]').val('Europe/Paris');
+ $('select[name=ecommerce]').val('1');
+ });
+ page.click('.btn');
+ page.wait(3000);
+
+ // manually remove port in tracking code, since ui-test.php won't be using the correct INI config file
+ page.evaluate(function () {
+ $('pre').each(function () {
+ var html = $(this).html();
+ html = html.replace(/localhost\:[0-9]+/g, 'localhost');
+ $(this).html(html);
+ });
+ });
+ }, done);
+ });
+
+ it("should display the congratulations page when next is clicked on the javascript tracking page", function (done) {
+ expect.screenshot("congrats").to.be.capture(function (page) {
+ page.click('.next-step .btn');
+ }, done);
+ });
+
+ it("should continue to piwik after submitting on the privacy settings form in the congrats page", function (done) {
+ expect.current_page.contains('.loginForm', function (page) {
+ page.click('.btn');
+ }, done);
+ });
+});
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_access_no_config.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_access_no_config.png
new file mode 100644
index 0000000000..106c6bbe2e
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_access_no_config.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:91fd579aeff30a36e2602bb1a42e99b1fe016897a3db83dd2bd0301142450477
+size 41049
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_congrats.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_congrats.png
new file mode 100644
index 0000000000..68b7cf3fbb
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_congrats.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:57559581248e01f52a3e9a326e70c4d90c93c40c2f8c1b689ac74692a3910cec
+size 167372
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_db_created.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_db_created.png
new file mode 100644
index 0000000000..de4365c8f4
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_db_created.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f809bd8bf3ac75e195927fc666b8de700cadbfc6284f9723d26b6d48dca2d2aa
+size 45086
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup.png
new file mode 100644
index 0000000000..f93dcf8055
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f3d00c6126d58e74d2e3411e74b97ebafc195d1b3c7fe3e90fb60debe5ab56fe
+size 55868
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup_fail.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup_fail.png
new file mode 100644
index 0000000000..a2c1f989e9
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_db_setup_fail.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e0a94c996cd69c279f19d332c1e02df174aba543f489f38caf658fa998d5591f
+size 66108
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png
new file mode 100644
index 0000000000..a8070dcb74
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6c62d570c05c94b169aac76fd9704ae53515c646480f0dfee7fdb2535a0fa369
+size 223966
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_nothing_to_see_here.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_nothing_to_see_here.png
new file mode 100644
index 0000000000..bbd43c59d3
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_nothing_to_see_here.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3f23267eeb24385e283f4ac459448080457b850dadacff31d6a4fe1c74d10d7c
+size 5913
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website.png
new file mode 100644
index 0000000000..5359db8168
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cb9c952ec6adea75a2b4a8603576060b87cbe4600894077f04d9b94c092582df
+size 75265
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website_fail.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website_fail.png
new file mode 100644
index 0000000000..4dc59bc11c
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_setup_website_fail.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7aab30190d9733746beee768a209f3005a5fb77874672e90dfb35be18e2e7f4b
+size 81826
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_start.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_start.png
new file mode 100644
index 0000000000..196eaec6d5
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_start.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:af0e4ecaf28dbce01b5aedb89c10de6d1b4377163a324d27c4818cba727b475d
+size 51447
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser.png
new file mode 100644
index 0000000000..f0d2e8392a
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81d7cf1be34848bd6aeaa42e69da9679c92c1728322aff152b8fab0e43058809
+size 61235
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_de.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_de.png
new file mode 100644
index 0000000000..d6624bb731
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_de.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:07c7e841aaf1570f16cd892491953f16f760a9625ed5733a463433145112e926
+size 69068
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_fail.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_fail.png
new file mode 100644
index 0000000000..388fc507d5
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_superuser_fail.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:09c74ada9fb02b5f2c6c4da2c12eb08379d5390873cdccb9b39b1c2af253cab9
+size 76808
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png
new file mode 100644
index 0000000000..3a062b354b
--- /dev/null
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_system_check.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bb68af70649e9cddb356225201426e0dc288337cc04e554cdb32695e1cb06637
+size 170620
diff --git a/plugins/LanguagesManager/Test/Integration/LanguagesManagerTest.php b/plugins/LanguagesManager/tests/Integration/LanguagesManagerTest.php
index 59124a79cd..ce92f9e191 100755..100644
--- a/plugins/LanguagesManager/Test/Integration/LanguagesManagerTest.php
+++ b/plugins/LanguagesManager/tests/Integration/LanguagesManagerTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Integration;
+namespace Piwik\Plugins\LanguagesManager\tests\Integration;
use Piwik\Cache;
use Piwik\Container\StaticContainer;
diff --git a/plugins/LanguagesManager/Test/Integration/ModelTest.php b/plugins/LanguagesManager/tests/Integration/ModelTest.php
index 023b43f293..023b43f293 100644
--- a/plugins/LanguagesManager/Test/Integration/ModelTest.php
+++ b/plugins/LanguagesManager/tests/Integration/ModelTest.php
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/ByBaseTranslationsTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/ByBaseTranslationsTest.php
index aba41991b6..0bcf8fb166 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/ByBaseTranslationsTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/ByBaseTranslationsTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Filter;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Filter;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Filter\ByBaseTranslations;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/ByParameterCountTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/ByParameterCountTest.php
index f8b57e9106..3a4fdb0133 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/ByParameterCountTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/ByParameterCountTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Filter;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Filter;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Filter\ByParameterCount;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/EmptyTranslationsTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/EmptyTranslationsTest.php
index da250c0d79..978e3a2862 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/EmptyTranslationsTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/EmptyTranslationsTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Filter;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Filter;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Filter\EmptyTranslations;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/EncodedEntitiesTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/EncodedEntitiesTest.php
index 9411a65124..c25e5d1fba 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/EncodedEntitiesTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/EncodedEntitiesTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Filter;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Filter;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Filter\EncodedEntities;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/UnnecassaryWhitespacesTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/UnnecassaryWhitespacesTest.php
index 701df50144..7d7134174e 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Filter/UnnecassaryWhitespacesTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Filter/UnnecassaryWhitespacesTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Filter;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Filter;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Filter\UnnecassaryWhitespaces;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Validate/CoreTranslationsTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Validate/CoreTranslationsTest.php
index cad5d59cc6..c3e49dc7ff 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Validate/CoreTranslationsTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Validate/CoreTranslationsTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Validate;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Validate;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Validate\CoreTranslations;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Validate/NoScriptsTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Validate/NoScriptsTest.php
index fcf5201d76..4d92b6b9b4 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/Validate/NoScriptsTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/Validate/NoScriptsTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter\Validate;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter\Validate;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Validate\NoScripts;
diff --git a/plugins/LanguagesManager/Test/Unit/TranslationWriter/WriterTest.php b/plugins/LanguagesManager/tests/Unit/TranslationWriter/WriterTest.php
index 61203c699e..7ddfe44d32 100644
--- a/plugins/LanguagesManager/Test/Unit/TranslationWriter/WriterTest.php
+++ b/plugins/LanguagesManager/tests/Unit/TranslationWriter/WriterTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\LanguagesManager\Test\Unit\TranslationWriter;
+namespace Piwik\Plugins\LanguagesManager\tests\Unit\TranslationWriter;
use Piwik\Container\StaticContainer;
use Piwik\Plugins\LanguagesManager\TranslationWriter\Filter\ByBaseTranslations;
diff --git a/plugins/Live/tests/UI/Live_spec.js b/plugins/Live/tests/UI/Live_spec.js
index 4b23982b3d..48278897fe 100644
--- a/plugins/Live/tests/UI/Live_spec.js
+++ b/plugins/Live/tests/UI/Live_spec.js
@@ -22,7 +22,7 @@ describe("Live", function () {
it('should show visitor log', function (done) {
expect.screenshot('visitor_log').to.be.captureSelector('.reporting-page', function (page) {
page.load("?module=CoreHome&action=index&idSite=1&period=year&date=2010-01-03#?idSite=1&period=year&date=2010-01-03&category=General_Visitors&subcategory=Live_VisitorLog");
- page.wait(4000);
+ page.wait(4500);
}, done);
});
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log.png
new file mode 100644
index 0000000000..e06a947ad8
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7deb4c75a3aad96ac2ee39bb2d952eb2f98b262dc1a4956045a0326ab369a5b5
+size 418228
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_expand_actions.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_expand_actions.png
new file mode 100644
index 0000000000..64ea2ff07a
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_expand_actions.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b037f3af9bc98346aac92757f5bc77a53dac5775e2ed8e35332247cac8d9d2f2
+size 52278
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_purged.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_purged.png
new file mode 100644
index 0000000000..9d72f7bea7
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_log_purged.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f847a4f5d240e5df9b053c791a6dd7b1b0da0770ebcbddbcec0d59beb34ab1e8
+size 22341
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile.png
new file mode 100644
index 0000000000..94675e842c
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:85449aeabc94166e94d45c63382c0d24ae066fe54cb9884ab29f8de0c4dbfe14
+size 435393
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_details.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_details.png
new file mode 100644
index 0000000000..fde76c0089
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_details.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bdcb2d78f415c0a62bd8ac6805f10c930eaf76ac00cac4de7643441b419e3764
+size 294925
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_tooltip.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_tooltip.png
new file mode 100644
index 0000000000..76d57c1187
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_action_tooltip.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9b844e25eea64abd30aff3db3dd560080f744d47853a0ae4360bca661f0893b6
+size 11399
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_actions_hidden.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_actions_hidden.png
new file mode 100644
index 0000000000..fbeb1fb72f
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_actions_hidden.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:284c12edcb06e0a32411d92d7091f5e369b0b0742f5763f603e87cd3c3d99815
+size 261019
diff --git a/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_visit_details.png b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_visit_details.png
new file mode 100644
index 0000000000..8975c15ecf
--- /dev/null
+++ b/plugins/Live/tests/UI/expected-screenshots/Live_visitor_profile_visit_details.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f8f7d7a6300f18d35a3d9ff17a49ea2b58d5ca233d3d360c91e357eba10862d
+size 271089
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log.png
deleted file mode 100644
index 94512ff71b..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_expand_actions.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_expand_actions.png
deleted file mode 100644
index 4abc286d8a..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_expand_actions.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_purged.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_purged.png
deleted file mode 100644
index a1bcdc71b0..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_log_purged.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile.png
deleted file mode 100644
index 84bdbd9a16..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_details.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_details.png
deleted file mode 100644
index 10f8154b31..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_details.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_tooltip.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_tooltip.png
deleted file mode 100644
index 3c59df6d85..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_action_tooltip.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_actions_hidden.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_actions_hidden.png
deleted file mode 100644
index 6a911d6d7c..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_actions_hidden.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_visit_details.png b/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_visit_details.png
deleted file mode 100644
index 92ee3ee9a0..0000000000
--- a/plugins/Live/tests/UI/expected-ui-screenshots/Live_visitor_profile_visit_details.png
+++ /dev/null
Binary files differ
diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js
new file mode 100644
index 0000000000..00349658c1
--- /dev/null
+++ b/plugins/Login/tests/UI/Login_spec.js
@@ -0,0 +1,122 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * login & password reset screenshot tests.
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("Login", function () {
+ this.timeout(0);
+
+ var md5Pass = "0adcc0d741277f74c64c8abab7330d1c", // md5("smarty-pants")
+ formlessLoginUrl = "?module=Login&action=logme&login=oliverqueen&password=" + md5Pass;
+
+ before(function () {
+ testEnvironment.testUseMockAuth = 0;
+ testEnvironment.queryParamOverride = {date: "2012-01-01", period: "year"};
+ testEnvironment.save();
+ });
+
+ after(function () {
+ testEnvironment.testUseMockAuth = 1;
+ delete testEnvironment.queryParamOverride;
+ testEnvironment.save();
+ });
+
+ it("should load correctly", function (done) {
+ expect.screenshot("login_form").to.be.capture(function (page) {
+ page.load("");
+ }, done);
+ });
+
+ it("should fail when incorrect credentials are supplied", function (done) {
+ expect.screenshot("login_fail").to.be.capture(function (page) {
+ page.sendKeys('#login_form_login', 'superUserLogin');
+ page.sendKeys('#login_form_password', 'wrongpassword');
+ page.click('#login_form_submit');
+ }, done);
+ });
+
+ it("should redirect to Piwik when correct credentials are supplied", function (done) {
+ expect.current_page.contains("#dashboard", function (page) {
+ page.sendKeys("#login_form_login", "superUserLogin");
+ page.sendKeys("#login_form_password", "superUserPass");
+ page.click("#login_form_submit");
+ }, done);
+ });
+
+ it("should redirect to login when logout link clicked", function (done) {
+ expect.screenshot("login_form").to.be.capture("logout_form", function (page) {
+ page.click("nav .right .icon-sign-out");
+ }, done);
+ });
+
+ it("login with email and password should work", function (done) {
+ expect.current_page.contains("#dashboard", function (page) {
+ page.sendKeys("#login_form_login", "hello@example.org");
+ page.sendKeys("#login_form_password", "superUserPass");
+ page.click("#login_form_submit");
+ }, done);
+ });
+
+ it("should display password reset form when forgot password link clicked", function (done) {
+ expect.screenshot("forgot_password").to.be.capture(function (page) {
+ page.click("nav .right .icon-sign-out");
+ page.click("a#login_form_nav");
+ }, done);
+ });
+
+ it("should show reset password form and error message on error", function (done) {
+ expect.screenshot("password_reset_error").to.be.capture(function (page) {
+ page.sendKeys("#reset_form_login", "superUserLogin");
+ page.sendKeys("#reset_form_password", "superUserPass2");
+ page.click("#reset_form_submit", 3000);
+ }, done);
+ });
+
+ it("should send email when password reset form submitted", function (done) {
+ expect.screenshot("password_reset").to.be.capture(function (page) {
+ page.reload();
+ page.click("a#login_form_nav");
+ page.sendKeys("#reset_form_login", "superUserLogin");
+ page.sendKeys("#reset_form_password", "superUserPass2");
+ page.sendKeys("#reset_form_password_bis", "superUserPass2");
+ page.click("#reset_form_submit", 3000);
+ }, done);
+ });
+
+ it("should reset password when password reset link is clicked", function (done) {
+ expect.screenshot("password_reset_complete").to.be.capture(function (page) {
+ var expectedMailOutputFile = PIWIK_INCLUDE_PATH + '/tmp/Login.resetPassword.mail.json',
+ mailSent = JSON.parse(require("fs").read(expectedMailOutputFile)),
+ resetUrl = mailSent.contents.match(/http:\/\/.*/)[0];
+
+ page.load(resetUrl);
+ }, done);
+ });
+
+ it("should login successfully when new credentials used", function (done) {
+ expect.page("").contains("#dashboard", function (page) {
+ page.sendKeys("#login_form_login", "superUserLogin");
+ page.sendKeys("#login_form_password", "superUserPass2");
+ page.click("#login_form_submit");
+ }, done);
+ });
+
+ it("should login successfully when formless login used", function (done) {
+ expect.page("").contains('#dashboard', /*'formless_login',*/ function (page) {
+ page.click("nav .right .icon-sign-out");
+ page.load(formlessLoginUrl);
+ }, done);
+ });
+
+ it('should not show login page when ips whitelisted and ip is not matching', function (done) {
+ expect.screenshot('ip_not_whitelisted').to.be.captureSelector('.box', function (page) {
+ testEnvironment.overrideConfig('General', 'login_whitelist_ip', ['199.199.199.199']);
+ testEnvironment.save();
+ page.load('');
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png b/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png
new file mode 100644
index 0000000000..c5fba3796b
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f982e40fa149ad7a4bf80677cbd4c190eb1405df9876e8a81301979ae85c90a2
+size 30106
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png b/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png
new file mode 100644
index 0000000000..e94aec5248
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ac5fb2553966da5e1bd0af6a77efcde69dbc1c306a4a64cd975ed589db63f928
+size 45775
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png
new file mode 100644
index 0000000000..f0fdb3fbe0
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3fe55aa649022f9ef42ab7eccbd03e439d5c75a279ba8c2ac49a01ee3c202b4
+size 32132
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png
new file mode 100644
index 0000000000..1e60fdb5fc
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3a0255df1c821d6d1e43d3f39ecca95be36428a856064413c4603624a63010c2
+size 24119
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_logout_form.png b/plugins/Login/tests/UI/expected-screenshots/Login_logout_form.png
new file mode 100644
index 0000000000..1e60fdb5fc
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_logout_form.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3a0255df1c821d6d1e43d3f39ecca95be36428a856064413c4603624a63010c2
+size 24119
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png
new file mode 100644
index 0000000000..cd2b7c700a
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ae7b55d52382c3cc3ab76225ffcecaf698b7b24a69c981cde41c91cb676cc54c
+size 34267
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png
new file mode 100644
index 0000000000..f6d3d32e1e
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:548ef9eea921fe491b702a5da26c02743df93c1c1b0ad3a798a81d18a4dd2d47
+size 28540
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png
new file mode 100644
index 0000000000..b3499160df
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f46a8f01df13f7d7ac44bfcf9d833f3a173b2eb1168f33ce9556b73468fb9c43
+size 39330
diff --git a/plugins/Marketplace/tests/UI/Marketplace_spec.js b/plugins/Marketplace/tests/UI/Marketplace_spec.js
new file mode 100644
index 0000000000..4c6e1ea936
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/Marketplace_spec.js
@@ -0,0 +1,265 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Screenshot tests for Marketplace.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("Marketplace", function () {
+ this.timeout(0);
+
+ this.fixture = "Piwik\\Plugins\\Marketplace\\tests\\Fixtures\\SimpleFixtureTrackFewVisits";
+
+ var urlBase = '?module=Marketplace&action=overview&';
+ var paidPluginsUrl = urlBase + 'show=premium';
+ var themesUrl = urlBase + 'show=themes';
+ var pluginsUrl = urlBase;
+
+ var noLicense = 'noLicense';
+ var expiredLicense = 'expiredLicense';
+ var exceededLicense = 'exceededLicense';
+ var validLicense = 'validLicense';
+
+ function loadPluginDetailPage(page, pluginName, isFreePlugin)
+ {
+ page.load(isFreePlugin ? pluginsUrl : paidPluginsUrl);
+ page.click('.card-title [piwik-plugin-name="' + pluginName + '"]');
+ }
+
+ function captureSelector(done, screenshotName, test, selector)
+ {
+ expect.screenshot(screenshotName).to.be.captureSelector(selector, test, done);
+ }
+
+ function captureMarketplace(done, screenshotName, test, selector)
+ {
+ if (!selector) {
+ selector = '';
+ }
+
+ captureSelector(done, screenshotName, test, '.marketplace' + selector);
+ }
+
+ function captureWithNotification(done, screenshotName, test)
+ {
+ captureMarketplace(done, screenshotName, test, ',#notificationContainer');
+ }
+
+ function captureWithDialog(done, screenshotName, test)
+ {
+ captureSelector(done, screenshotName, test, '.ui-dialog:visible');
+ }
+
+ function assumePaidPluginsActivated()
+ {
+ testEnvironment.mockMarketplaceAssumePluginNamesActivated = ['CustomPlugin1','CustomPlugin2','PaidPlugin1','PaidPlugin2'];
+ testEnvironment.save();
+ }
+
+ function setEnvironment(mode, consumer)
+ {
+ if (mode === 'user') {
+ testEnvironment.idSitesViewAccess = [1];
+ } else {
+ // superuser
+ testEnvironment.idSitesViewAccess = [];
+ }
+
+ if (mode === 'multiUserEnvironment') {
+ testEnvironment.overrideConfig('General', 'multi_server_environment', '1');
+ } else {
+ testEnvironment.overrideConfig('General', 'multi_server_environment', '0');
+ }
+
+ testEnvironment.overrideConfig('General', 'enable_plugins_admin', '1');
+
+ delete testEnvironment.mockMarketplaceAssumePluginNamesActivated;
+
+ testEnvironment.consumer = consumer;
+ testEnvironment.mockMarketplaceApiService = 1;
+ testEnvironment.save();
+ }
+
+ ['superuser', 'user', 'multiUserEnvironment'].forEach(function (mode) {
+
+ if (mode !== 'user') {
+ it('should show available updates in plugins page', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureSelector(done, 'updates_' + mode, function (page) {
+ page.load('?module=CorePluginsAdmin&action=plugins&idSite=1&period=day&date=yesterday&activated=');
+ }, '#content .card:first');
+ });
+ }
+
+ it(mode + ' for a user without license key should be able to open paid plugins', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureMarketplace(done, 'paid_plugins_no_license_' + mode, function (page) {
+ page.load(paidPluginsUrl);
+ });
+ });
+
+ it(mode + ' for a user with license key should be able to open paid plugins', function (done) {
+ setEnvironment(mode, validLicense);
+
+ captureMarketplace(done, 'paid_plugins_with_license_' + mode, function (page) {
+ page.load(paidPluginsUrl);
+ });
+ });
+
+ it(mode + ' for a user with exceeded license key should be able to open paid plugins', function (done) {
+ setEnvironment(mode, exceededLicense);
+ assumePaidPluginsActivated();
+
+ captureMarketplace(done, 'paid_plugins_with_exceeded_license_' + mode, function (page) {
+ page.load(paidPluginsUrl);
+ });
+ });
+
+ it('should show themes page', function (done) {
+ setEnvironment(mode, validLicense);
+
+ captureMarketplace(done, 'themes_with_valid_license_' + mode, function (page) {
+ page.load(themesUrl);
+ });
+ });
+
+ it('should show free plugin details', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureWithDialog(done, 'free_plugin_details_' + mode, function (page) {
+ var isFree = true;
+ loadPluginDetailPage(page, 'TreemapVisualization', isFree);
+ });
+ });
+
+ it('should show paid plugin details when having no license', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureWithDialog(done, 'paid_plugin_details_no_license_' + mode, function (page) {
+ assumePaidPluginsActivated();
+ var isFree = false;
+ loadPluginDetailPage(page, 'PaidPlugin1', isFree);
+ });
+ });
+
+ it('should show paid plugin details when having valid license', function (done) {
+ setEnvironment(mode, validLicense);
+
+ captureWithDialog(done, 'paid_plugin_details_valid_license_' + mode + '_installed', function (page) {
+ assumePaidPluginsActivated();
+ var isFree = false;
+ loadPluginDetailPage(page, 'PaidPlugin1', isFree);
+ });
+ });
+
+ it('should show paid plugin details when having valid license', function (done) {
+ setEnvironment(mode, exceededLicense);
+
+ captureWithDialog(done, 'paid_plugin_details_exceeded_license_' + mode, function (page) {
+ assumePaidPluginsActivated();
+ var isFree = false;
+ loadPluginDetailPage(page, 'PaidPlugin1', isFree);
+ });
+ });
+ });
+
+ var mode = 'superuser';
+
+ it('should show a dialog showing a list of all possible plugins to install', function (done) {
+ setEnvironment(mode, validLicense);
+
+ captureSelector(done, mode + '_install_all_paid_plugins_at_once', function (page) {
+ page.load(pluginsUrl);
+ page.click('.installAllPaidPlugins');
+ }, '.modal.open');
+ });
+
+ it('should show an error message when invalid license key entered', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureWithNotification(done, mode + '_invalid_license_key_entered', function (page) {
+ page.load(pluginsUrl);
+ page.sendKeys('#license_key', 'invalid');
+ page.click('.marketplace-paid-intro'); // click outside so change event is triggered
+ page.click('#submit_license_key input');
+ });
+ });
+
+ it('should show a confirmation before removing a license key', function (done) {
+ setEnvironment(mode, validLicense);
+
+ captureSelector(done, mode + '_remove_license_key_confirmation', function (page) {
+ page.load(pluginsUrl);
+ page.click('#remove_license_key input');
+ }, '.modal.open');
+ });
+
+ it('should show a confirmation before removing a license key', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureMarketplace(done, mode + '_remove_license_key_confirmed', function (page) {
+ page.click('.modal.open .modal-footer a:contains(Yes)')
+ });
+ });
+
+ it('should show a success message when valid license key entered', function (done) {
+ setEnvironment(mode, noLicense);
+
+ captureMarketplace(done, mode + '_valid_license_key_entered', function (page) {
+ page.load(pluginsUrl);
+ page.sendKeys('#license_key', 'valid');
+ page.execCallback(function () {
+ setEnvironment(mode, validLicense);
+ });
+ page.click('#submit_license_key input');
+ });
+ });
+
+ it('should hide activate / deactivate buttons if plugins admin is disabled', function (done) {
+ setEnvironment(mode, noLicense);
+ testEnvironment.overrideConfig('General', 'enable_plugins_admin', '0');
+ testEnvironment.save();
+
+ captureMarketplace(done, mode + '_enable_plugins_admin', function (page) {
+ page.load(pluginsUrl);
+ });
+ });
+
+ it('should hide activate / deactivate buttons if plugins admin is disabled when also multi server environment is enabled', function (done) {
+ setEnvironment('multiUserEnvironment', noLicense);
+ testEnvironment.overrideConfig('General', 'enable_plugins_admin', '0');
+ testEnvironment.save();
+
+ captureMarketplace(done, mode + '_enable_plugins_admin_with_multiserver_enabled', function (page) {
+ page.load(pluginsUrl);
+ });
+ });
+
+ [expiredLicense, exceededLicense, validLicense, noLicense].forEach(function (consumer) {
+ it('should show a subscription overview for ' + consumer, function (done) {
+ setEnvironment('superuser', consumer);
+
+ captureSelector(done, 'subscription_overview_' + consumer, function (page) {
+ page.load('?module=Marketplace&action=subscriptionOverview');
+ }, '#content');
+ });
+ });
+
+ [noLicense, expiredLicense, exceededLicense].forEach(function (consumer) {
+ // when there is no license it should not show a warning! as it could be due to network problems etc
+ it('should show a warning if license is ' + consumer, function (done) {
+ setEnvironment('superuser', consumer);
+
+ assumePaidPluginsActivated();
+
+ captureSelector(done, 'notification_plugincheck_' + consumer, function (page) {
+ page.load('?module=UsersManager&action=index');
+ }, '#notificationContainer');
+ });
+ });
+
+}); \ No newline at end of file
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_multiUserEnvironment.png
new file mode 100644
index 0000000000..706142905a
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4a35d7de7a256065286313e28c4d36e80ca56c937ab0c6776b9d6c2942392705
+size 66106
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_superuser.png
new file mode 100644
index 0000000000..7ca86ff97e
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:856c5f6308c2813cc24e9432cceb47c447384c96445b62b5f5d09a59b225c5ac
+size 48175
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_user.png
new file mode 100644
index 0000000000..83ab6b3a61
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_free_plugin_details_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3bb6d27370a8eea01e9a9d367fddcb3b8bb9c76f9bed76a09a7b90cdfa205bd6
+size 46416
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_exceededLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_exceededLicense.png
new file mode 100644
index 0000000000..c591ae0f01
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_exceededLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:60a547c36d293ccb81670f4d5e60c40eb15104691b37de7df292b76376c68b15
+size 26734
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_expiredLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_expiredLicense.png
new file mode 100644
index 0000000000..d4d0304978
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_expiredLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:840f449f735db70207fd236989107859740084e9184d7f3f4513f86fd7d99718
+size 25165
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_noLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_noLicense.png
new file mode 100644
index 0000000000..6e1ffbc3fe
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_notification_plugincheck_noLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c3de246e0bc1b50b8d7164bb4f9b1968fcf8008fe093e012204ffe01ba97a66
+size 22057
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_multiUserEnvironment.png
new file mode 100644
index 0000000000..67d5294c85
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7d25e42bd8aa02f852b06c95fb1ef82dd31e6693bb47c8f973135661c25429b3
+size 109458
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_superuser.png
new file mode 100644
index 0000000000..35c8175179
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:add3a31b52f627b4a544946c2f79f932ad6723f42f80c06f0b0d8e376f84ea8e
+size 91514
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_user.png
new file mode 100644
index 0000000000..c7e9797720
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_exceeded_license_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d8b15174bf499438250122917c6f7c83a066935cf0567df86801df36151e3e68
+size 75647
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_multiUserEnvironment.png
new file mode 100644
index 0000000000..cfab7e7be4
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:563c5ecadc33509309de4aad2fb50b4cd9e7f1a28c179884451117e2f163384e
+size 107662
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_superuser.png
new file mode 100644
index 0000000000..4e2eabd3da
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9840b00f44001b135ab6defe63eb8819817a6f9dff0a656d9f049b4dd47cc3b2
+size 89642
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_user.png
new file mode 100644
index 0000000000..85d85ae9df
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_no_license_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e848f438c89fffcb3593d218a5845d3c66628d2b41aa94ec9b334e42383ca144
+size 75472
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_multiUserEnvironment_installed.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_multiUserEnvironment_installed.png
new file mode 100644
index 0000000000..2b97722959
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_multiUserEnvironment_installed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:08b916d31a312a8720e086ce940e65617ae490bba3a27c2ae25db2feebac3d3e
+size 91812
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_superuser_installed.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_superuser_installed.png
new file mode 100644
index 0000000000..f5b7ae1fc2
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_superuser_installed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:26436ec0a50bfb4c5f02311751d0fd0d92864f9b0c157f162372aed4c34a8fa6
+size 72571
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_user_installed.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_user_installed.png
new file mode 100644
index 0000000000..0c9464889e
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugin_details_valid_license_user_installed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9eb7f2de86f6f0bc1b8e53e13344b91bbc1d464bcbe92c965fa35a3d39cd17ec
+size 71723
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png
new file mode 100644
index 0000000000..ee8ca7908f
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5bc041b4ec873b4e09e7f7a8f269fc76309e7b8e09faa2702602f41edbbcdfc7
+size 58579
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png
new file mode 100644
index 0000000000..ee8ca7908f
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5bc041b4ec873b4e09e7f7a8f269fc76309e7b8e09faa2702602f41edbbcdfc7
+size 58579
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png
new file mode 100644
index 0000000000..e3516981a1
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_no_license_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6d7b08a85325b43ba0205771997c72b04266601b303244622891fce7a964e030
+size 59166
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png
new file mode 100644
index 0000000000..8afe5cca9b
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9140f66bef0046e34764d6e196cedf8df221aa07f61aa4a0bc2004a14791dcfb
+size 67856
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png
new file mode 100644
index 0000000000..8afe5cca9b
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9140f66bef0046e34764d6e196cedf8df221aa07f61aa4a0bc2004a14791dcfb
+size 67856
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png
new file mode 100644
index 0000000000..a7b85321a0
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_exceeded_license_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c3bc43f84d8baa884249960d603d7fba194f6fada3d59a63b9da3cfc9db0867
+size 48227
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png
new file mode 100644
index 0000000000..8b61cdf728
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d77360b5ce05ede5c702a4512dbc81d0a1a50eae97100841551cc55c22c06b30
+size 69264
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png
new file mode 100644
index 0000000000..cb4cd763f5
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:268efe7b26a6cb4f212fdf1af3f8e25bc3c371f421284cf21b456694f4035442
+size 70079
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png
new file mode 100644
index 0000000000..eacc5d133b
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_paid_plugins_with_license_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:35c2545168f9469811a0a8ece4b4ee3787477c19d4991935f3a593774a372993
+size 50409
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_exceededLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_exceededLicense.png
new file mode 100644
index 0000000000..00cbc38079
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_exceededLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c33cf72bca24ed354f51d1c86dc5de5b61b4d00bb83ca006594f15c935ae5b20
+size 74664
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_expiredLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_expiredLicense.png
new file mode 100644
index 0000000000..79d38f5188
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_expiredLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a35c5cffbe58bf031b174979468c29b33278b198c261ba125f60c3e965af2214
+size 81356
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_noLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_noLicense.png
new file mode 100644
index 0000000000..6b0e2c20a4
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_noLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1ef404681d8edf1447abdde9350dca6e37934fa5064b58241c092102eef82753
+size 17178
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_validLicense.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_validLicense.png
new file mode 100644
index 0000000000..907b6a146a
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_subscription_overview_validLicense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:894d8b780dc3665849bae68bb51149f1b5f574bc2e05ecbaa42c4852ad3b8b24
+size 52902
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png
new file mode 100644
index 0000000000..c33c13f69e
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bb6965c0185f00527d5005b97a3ae5c6bb0c0eff8f6fbf41297dc1c9505c4070
+size 987988
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png
new file mode 100644
index 0000000000..cd8463f7f0
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_enable_plugins_admin_with_multiserver_enabled.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6befb8c6e5968c3b734391584a8e817a4eeaa1910d9f237f40f5a77f28ca6d31
+size 1016004
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_install_all_paid_plugins_at_once.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_install_all_paid_plugins_at_once.png
new file mode 100644
index 0000000000..62e8cf7bea
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_install_all_paid_plugins_at_once.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b2d0a30b1a7d67673fece45bc664f46c188ca27b1c1b6bd92cf1a0e5b377d6ec
+size 19257
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png
new file mode 100644
index 0000000000..e27285129a
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_invalid_license_key_entered.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6c387803ecc780072306cb3052c4e4301d41b0a52729dbf8345eafb00d9f3d6
+size 1005016
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmation.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmation.png
new file mode 100644
index 0000000000..31446ff085
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmation.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aaebbf81af29fb9d7445df16938460504202430053dc6b243257c9b4dfe64811
+size 17625
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png
new file mode 100644
index 0000000000..95f9865068
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_remove_license_key_confirmed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c4c1d5d3e6be1680a06da9016de6639876b02511f8acb6def60116018d8bd83
+size 999415
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png
new file mode 100644
index 0000000000..3576f51e8f
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_superuser_valid_license_key_entered.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b75a394364078861dd8a91da8d8ca42e2ee676685f3d3efb9b716e5fe3c30f92
+size 1009353
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png
new file mode 100644
index 0000000000..0ef7a6c29b
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0503a5eb056e1776482d40f1802f0e453fd3eb147193355d331f071112e6e95a
+size 185713
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png
new file mode 100644
index 0000000000..677b11aea3
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5df695fdb720b70ec9ad5fdb29a0d2abd59368a87dbb574b0e3e88e0919fbead
+size 184984
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png
new file mode 100644
index 0000000000..944db318f7
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_themes_with_valid_license_user.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d2cec06994c62c9c012e61580c74865e74ac7f53fdaf3a14bb11691a633388a
+size 162686
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_multiUserEnvironment.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_multiUserEnvironment.png
new file mode 100644
index 0000000000..0680b75805
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_multiUserEnvironment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:abdee96a941b423b4172836d6499e89d19bd0bfb8dd2b853627f984439b911ac
+size 33611
diff --git a/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_superuser.png b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_superuser.png
new file mode 100644
index 0000000000..e8e4b1c3e4
--- /dev/null
+++ b/plugins/Marketplace/tests/UI/expected-screenshots/Marketplace_updates_superuser.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6f3aae52b2e6d2f6fcdd433103d00a83438048992e81e9921cf96ba067142199
+size 32998
diff --git a/plugins/Morpheus/tests/UI/Morpheus_spec.js b/plugins/Morpheus/tests/UI/Morpheus_spec.js
new file mode 100644
index 0000000000..7e36e9c5f1
--- /dev/null
+++ b/plugins/Morpheus/tests/UI/Morpheus_spec.js
@@ -0,0 +1,24 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("Morpheus", function () {
+ this.timeout(0);
+
+ var url = "?module=Morpheus&action=demo";
+
+ before(function () {
+ // Enable development mode
+ testEnvironment.overrideConfig('Development', 'enabled', true);
+ testEnvironment.save();
+ });
+
+ it("should show all UI components and CSS classes", function (done) {
+ expect.screenshot('load').to.be.capture(function (page) {
+ page.load(url, 2500);
+ }, done);
+ });
+});
diff --git a/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png b/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png
new file mode 100644
index 0000000000..7328418028
--- /dev/null
+++ b/plugins/Morpheus/tests/UI/expected-screenshots/Morpheus_load.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:281c004e26db482472f5698b90890dbdcda6f117e7e71f4481ad2737915fd3f3
+size 1242172
diff --git a/plugins/MultiSites/tests/UI/MultiSites_spec.js b/plugins/MultiSites/tests/UI/MultiSites_spec.js
new file mode 100644
index 0000000000..832955e70a
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/MultiSites_spec.js
@@ -0,0 +1,72 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Screenshot integration tests for MultiSites.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("MultiSitesTest", function () {
+ this.timeout(0);
+
+ var generalParams = 'idSite=1&period=year&date=2012-08-09';
+ var selector = '#multisites,.expandDataTableFooterDrawer';
+
+ var createdSiteId = null;
+
+ before(function (done) {
+ var callback = function (error, response) {
+ if (error) {
+ done(error, response);
+ return;
+ }
+
+ createdSiteId = response.value;
+ done();
+ };
+
+ testEnvironment.callApi("SitesManager.addSite", {
+ siteName: '%3CMy%20website%22%27%3E%3B%2C%3F with a very very very very long stupid name',
+ urls: 'http%3A%2F%2Fpiwik.org'},
+ callback);
+ });
+
+ after(function (done) {
+ if (createdSiteId) {
+ testEnvironment.callApi("SitesManager.deleteSite", {idSite: createdSiteId}, done);
+ }
+ });
+
+ it('should load the all websites dashboard correctly', function (done) {
+ this.retries(3);
+
+ expect.screenshot('all_websites').to.be.captureSelector(selector, function (page) {
+ page.load("?" + generalParams + "&module=MultiSites&action=index");
+ page.wait(3000);
+ }, done);
+ });
+
+ it('should load next page correctly', function (done) {
+ this.retries(3);
+
+ expect.screenshot('all_websites_page_1').to.be.captureSelector(selector, function (page) {
+ page.click('.paging .next');
+ page.wait(1000);
+ }, done);
+ });
+
+ it('should search correctly', function (done) {
+ expect.screenshot('all_websites_search').to.be.captureSelector(selector, function (page) {
+ page.sendKeys('.site_search input', 'Site');
+ page.click('.site_search .search_ico');
+ }, done);
+ });
+
+ it('should toggle sort order when click on current metric', function (done) {
+ expect.screenshot('all_websites_changed_sort_order').to.be.captureSelector(selector, function (page) {
+ page.click('#visits .heading');
+ }, done);
+ });
+
+});
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png
new file mode 100644
index 0000000000..3c2fc1ef8b
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:28cde14696cab904cdf1ff20caa839456f559ef1b4c165ba5b02fcd42a351d3b
+size 77346
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png
new file mode 100644
index 0000000000..98a1bf9f35
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:15a766fe64a245931131000412d5e2ad9ede120306d9dd2b12960772d7211044
+size 67240
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png
new file mode 100644
index 0000000000..3c2fc1ef8b
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:28cde14696cab904cdf1ff20caa839456f559ef1b4c165ba5b02fcd42a351d3b
+size 77346
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png
new file mode 100644
index 0000000000..2d2063916a
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e9ebb3b39db30606aacecc9cb2b0c1695d7e9447e65244b2ef61d22f5821fe64
+size 67203
diff --git a/plugins/Overlay/tests/UI/Overlay_spec.js b/plugins/Overlay/tests/UI/Overlay_spec.js
new file mode 100644
index 0000000000..9ac41c0e5c
--- /dev/null
+++ b/plugins/Overlay/tests/UI/Overlay_spec.js
@@ -0,0 +1,138 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Overlay screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+describe("Overlay", function () {
+ this.retries(3);
+
+ this.timeout(0);
+
+ var url = null;
+ var urlWithSegment;
+
+ function removeOptOutIframe(page) {
+ page.evaluate(function () {
+ $('iframe#optOutIframe', $('iframe').contents()).remove();
+ });
+ }
+
+ before(function (done) {
+ var baseUrl = '?module=Overlay&period=year&date=today&idSite=3';
+ var hash = '#?l=' + encodeURIComponent(testEnvironment.overlayUrl).replace(/[%]/g, "$");
+
+ url = baseUrl + hash;
+ urlWithSegment = baseUrl + '&segment=' + encodeURIComponent('visitIp==20.56.34.67') + hash;
+
+ testEnvironment.callApi("SitesManager.addSiteAliasUrls", {idSite: 3, urls: [config.piwikUrl]}, done);
+ });
+
+ after(function (done) {
+ testEnvironment.callApi("SitesManager.setSiteAliasUrls", {idSite: 3, urls: []}, done);
+ });
+
+ it("should load correctly", function (done) {
+ expect.screenshot("loaded").to.be.capture(function (page) {
+ page.load(url);
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should show clicks when hover over link in iframe", function (done) {
+ expect.screenshot("page_link_clicks").to.be.capture(function (page) {
+ var pos = page.webpage.evaluate(function () {
+ var iframe = $('iframe'),
+ innerOffset = $('.btn.btn-large', iframe.contents()).offset();
+ return {
+ x: iframe.offset().left + innerOffset.left,
+ y: iframe.offset().top + innerOffset.top
+ };
+ });
+ page.sendMouseEvent('mousemove', pos);
+
+ page.evaluate(function () {
+ $('div#PIS_StatusBar', $('iframe').contents()).each(function () {
+ var html = $(this).html();
+ html = html.replace(/localhost\:[0-9]+/g, 'localhost');
+ $(this).html(html);
+ });
+ });
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should show stats for new links when dropdown opened", function (done) {
+ expect.screenshot("page_new_links").to.be.capture(function (page) {
+ page.reload(2500);
+ page.evaluate(function(){
+ $('.dropdown-toggle', $('iframe').contents())[0].click();
+ }, 500);
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should change page when clicking on internal iframe link", function (done) {
+ expect.screenshot("page_change").to.be.capture(function (page) {
+ var pos = page.webpage.evaluate(function () {
+ var iframe = $('iframe'),
+ innerOffset = $('ul.nav>li:nth-child(2)>a', iframe.contents()).offset();
+ return {
+ x: iframe.offset().left + innerOffset.left + 32, // position is incorrect for some reason w/o adding pixels
+ y: iframe.offset().top + innerOffset.top
+ };
+ });
+ page.sendMouseEvent('click', pos);
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should change date range when period changed", function (done) {
+ expect.screenshot("period_change").to.be.capture(function (page) {
+ page.evaluate(function () {
+ $('#overlayDateRangeSelect').val('day;yesterday').trigger('change');
+ });
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should open row evolution popup when row evolution link clicked", function (done) {
+ expect.screenshot("row_evolution").to.be.capture(function (page) {
+ page.evaluate(function () {
+ $('#overlayRowEvolution').click();
+ }, 500);
+ page.evaluate(function () {
+ $('.jqplot-xaxis').hide(); // xaxis will change every day so hide it
+ });
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should open transitions popup when transitions link clicked", function (done) {
+ expect.screenshot("transitions").to.be.capture(function (page) {
+ page.evaluate(function () {
+ $('button.ui-dialog-titlebar-close').click();
+ }, 500);
+ page.evaluate(function () {
+ $('#overlayTransitions').click();
+ }, 500);
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+
+ it("should load an overlay with segment", function (done) {
+ expect.screenshot("loaded_with_segment").to.be.capture(function (page) {
+ page.load(urlWithSegment);
+
+ removeOptOutIframe(page);
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded.png
new file mode 100644
index 0000000000..2acc288baf
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:378eebedf0042fcf27c9201c01694ef513069e4c8c59055693b4f46c2713255a
+size 108949
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png
new file mode 100644
index 0000000000..7a5dc8118c
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_loaded_with_segment.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8f48d2268123d1251e887e31f5a7861461f5583cfc00c517b42dd179e064bc40
+size 106269
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_change.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_change.png
new file mode 100644
index 0000000000..3a513ad0fb
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_change.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:97d3eea2ca2f93a80a99e5f9953ce89b2a3ce2b575eec9d03522e9a736542ec5
+size 215769
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_link_clicks.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_link_clicks.png
new file mode 100644
index 0000000000..3396f1e0ef
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_link_clicks.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:05ca31c1b3d51b978ac323ec44ecc2b4d5c69074d7557db23fe2e2f063553883
+size 115439
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_new_links.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_new_links.png
new file mode 100644
index 0000000000..f447a77846
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_page_new_links.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:264c880c261ce3ac783b34072a3e4aedd9c6ac1d50aa4888366fe7287227e8cc
+size 119311
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_period_change.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_period_change.png
new file mode 100644
index 0000000000..27c2e63bde
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_period_change.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:68eecc71e96d62a0abe75ed98dcaf09f33e882c5de4705c65553f1fcf88f3ebc
+size 217412
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_row_evolution.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_row_evolution.png
new file mode 100644
index 0000000000..1445b051a2
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_row_evolution.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c9d6595a4e21f40d8a48fa492d9988f5038bc171bc881cbd9c660396e48093b
+size 112711
diff --git a/plugins/Overlay/tests/UI/expected-screenshots/Overlay_transitions.png b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_transitions.png
new file mode 100644
index 0000000000..15e982430d
--- /dev/null
+++ b/plugins/Overlay/tests/UI/expected-screenshots/Overlay_transitions.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f58690b7e5141ebeccc4785cf73af497af2455c89cc83daabc5f80f4630bd6dd
+size 133021
diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
new file mode 100644
index 0000000000..b6d4df0691
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
@@ -0,0 +1,229 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * SegmentEditor screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("SegmentSelectorEditorTest", function () {
+ var selectorsToCapture = ".segmentEditorPanel,.segmentEditorPanel .dropdown-body,.segment-element";
+
+ this.timeout(0);
+
+ var generalParams = 'idSite=1&period=year&date=2012-08-09';
+ var url = '?module=CoreHome&action=index&' + generalParams + '#?' + generalParams + '&category=General_Actions&subcategory=General_Pages';
+
+ function selectFieldValue(page, fieldName, textToSelect)
+ {
+ page.execCallback(function () {
+ page.webpage.evaluate(function(fieldName) {
+ $(fieldName + ' input.select-dropdown').click();
+ }, fieldName);
+ });
+ page.execCallback(function () {
+ page.webpage.evaluate(function(fieldName, textToSelect) {
+ $(fieldName + ' .dropdown-content.active li:contains("' + textToSelect + '"):first').click();
+ }, fieldName, textToSelect);
+ });
+ }
+
+ function selectDimension(page, prefixSelector, category, name)
+ {
+ page.click(prefixSelector + ' .metricListBlock .select-wrapper');
+ page.click(prefixSelector + ' .metricListBlock .expandableList h4:contains(' + category + ')');
+ page.click(prefixSelector + ' .metricListBlock .expandableList .secondLevel li:contains(' + name + ')');
+ }
+
+ it("should load correctly", function (done) {
+ expect.screenshot("0_initial").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.load(url);
+ }, done);
+ });
+
+ it("should open selector when control clicked", function (done) {
+ expect.screenshot("1_selector_open").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentationContainer .title');
+ }, done);
+ });
+
+ it("should open segment editor when edit link clicked for existing segment", function (done) {
+ expect.screenshot("2_segment_editor_update").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.evaluate(function() {
+ $('.segmentList .editSegment:first').click()
+ }, 200);
+ }, done);
+ });
+
+ it("should start editing segment name when segment name edit link clicked", function (done) {
+ expect.screenshot("3_segment_editor_edit_name").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentEditorPanel .editSegmentName');
+ }, done);
+ });
+
+ it("should show the egment editor's available segments dropdown", function (done) {
+ expect.screenshot("6_segment_editor_droplist").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.mouseMove('.available_segments a.dropList');
+ page.click('.available_segments a.dropList');
+ }, done);
+ });
+
+ it("should change segment when another available segment clicked in segment editor's available segments dropdown", function (done) {
+ expect.screenshot("6_segment_editor_different").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.ui-menu-item a:contains(Add new segment)');
+ }, done);
+ });
+
+ it("should close the segment editor when the close link is clicked", function (done) {
+ expect.screenshot("7_segment_editor_closed").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.evaluate(function () {
+ $('.segmentEditorPanel .segment-footer .close').click();
+ });
+ }, done);
+ });
+
+ it("should open blank segment editor when create new segment link is clicked", function (done) {
+ expect.screenshot("8_segment_editor_create").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentationContainer .title');
+ page.click('.add_new_segment');
+ }, done);
+ });
+
+ it("should update segment expression when selecting different segment", function (done) {
+ expect.screenshot("dimension_drag_drop").to.be.captureSelector(selectorsToCapture, function (page) {
+ selectDimension(page, '.segmentRow0', 'Actions', 'Action URL');
+ }, done);
+ });
+
+ // phantomjs won't take screenshots of dropdown windows, so skip this test
+ it.skip("should show suggested segment values when a segment value input is focused", function (done) {
+ expect.screenshot("suggested_values").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentEditorPanel .ui-autocomplete-input');
+ }, done);
+ });
+
+ it("should add an OR condition when clicking on add OR", function (done) {
+ expect.screenshot("add_new_or_condition").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentEditorPanel .segment-add-or');
+ }, done);
+ });
+
+ it("should add an OR condition when a segment dimension is selected in the OR placeholder section", function (done) {
+ expect.screenshot("drag_or_condition").to.be.captureSelector(selectorsToCapture, function (page) {
+ selectDimension(page, '.segmentRow0 .segment-row:last', 'Actions', 'Clicked URL');
+ }, done);
+ });
+
+ it("should add an AND condition when clicking on add AND", function (done) {
+ expect.screenshot("add_new_and_condition").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentEditorPanel .segment-add-row');
+ }, done);
+ });
+
+ it("should add an AND condition when a segment dimension is dragged to the AND placeholder section", function (done) {
+ expect.screenshot("drag_and_condition").to.be.captureSelector(selectorsToCapture, function (page) {
+ selectDimension(page, '.segmentRow1', 'Actions', 'Clicked URL');
+ }, done);
+ });
+
+ it("should save a new segment and add it to the segment list when the form is filled out and the save button is clicked", function (done) {
+ expect.screenshot("saved").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.evaluate(function () {
+ $('.metricValueBlock input').each(function (index) {
+ $(this).val('value ' + index).change();
+ });
+ });
+
+ page.sendKeys('input.edit_segment_name', 'new segment');
+ page.click('.segmentRow0 .segment-or'); // click somewhere else to save new name
+
+ page.evaluate(function () {
+ $('button.saveAndApply').click();
+ });
+
+ page.click('.segmentationContainer');
+ }, done);
+ });
+
+ it("should show the new segment after page reload", function (done) {
+ expect.screenshot("saved").to.be.captureSelector("saved_reload", selectorsToCapture, function (page) {
+ page.reload();
+ page.click('.segmentationContainer .title');
+ }, done);
+ });
+
+ it("should correctly load the new segment's details when the new segment is edited", function (done) {
+ expect.screenshot("saved_details").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentList li[data-idsegment=4] .editSegment');
+ }, done);
+ });
+
+ it("should correctly should show a confirmation when changing segment definition", function (done) {
+ expect.screenshot("update_confirmation").to.be.captureSelector('.modal.open', function (page) {
+ page.click('.segmentEditorPanel .editSegmentName');
+ page.evaluate(function () {
+ $('input.edit_segment_name').val('').change();
+ });
+ page.sendKeys('input.edit_segment_name', 'edited segment');
+ page.click('.segmentRow0 .segment-or:first'); // click somewhere else to save new name
+
+ selectFieldValue(page, '.segmentRow0 .segment-row:first .metricMatchBlock', 'Is not');
+ selectFieldValue(page, '.segmentRow0 .segment-row:last .metricMatchBlock', 'Is not');
+ selectFieldValue(page, '.segmentRow1 .segment-row .metricMatchBlock', 'Is not');
+
+ page.evaluate(function () {
+ $('.metricValueBlock input').each(function (index) {
+ $(this).val('new value ' + index).change();
+ });
+ });
+
+ page.evaluate(function () {
+ $('button.saveAndApply').click();
+ });
+ }, done);
+ });
+
+ it("should correctly update the segment when saving confirmed", function (done) {
+ expect.screenshot("updated").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.modal.open .modal-footer a:contains(Yes):visible');
+ page.click('.segmentationContainer');
+ }, done);
+ });
+
+ it("should show the updated segment after page reload", function (done) {
+ expect.screenshot("updated_reload").to.be.captureSelector("updated_reload", selectorsToCapture, function (page) {
+ page.reload();
+ page.click('.segmentationContainer .title');
+ }, done);
+ });
+
+ it("should correctly load the updated segment's details when the updated segment is edited", function (done) {
+ expect.screenshot("updated_details").to.be.captureSelector(selectorsToCapture, function (page) {
+ page.click('.segmentList li[data-idsegment=4] .editSegment');
+ }, done);
+ });
+
+ it("should correctly show delete dialog when the delete link is clicked", function (done) {
+ expect.screenshot('deleted_dialog').to.be.captureSelector('.modal.open', function (page) {
+ page.evaluate(function () {
+ $('.segmentEditorPanel a.delete').click();
+ });
+ }, done);
+ });
+
+ it("should correctly remove the segment when the delete dialog is confirmed", function (done) {
+ expect.screenshot('deleted').to.be.captureSelector(selectorsToCapture + ',.modal.open', function (page) {
+ page.click('.modal.open .modal-footer a:contains(Yes):visible');
+
+ page.click('.segmentationContainer .title');
+ }, done);
+ });
+
+ it("should not show the deleted segment after page reload", function (done) {
+ expect.screenshot('deleted').to.be.captureSelector('deleted_reload', selectorsToCapture, function (page) {
+ page.reload();
+ page.click('.segmentationContainer .title');
+ }, done);
+ });
+});
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_0_initial.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_0_initial.png
new file mode 100644
index 0000000000..d6de73a2fd
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_0_initial.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:218a2eaa3fadd389eeb0a65295b120cd8386933c8272d00a266d270a420e8e3f
+size 1346
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png
new file mode 100644
index 0000000000..1ea5114ca3
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_1_selector_open.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f8ce932f4790d07b8e43855b6c06efb2305c65bc65bf2847cc60d9427d5f424
+size 16383
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png
new file mode 100644
index 0000000000..77f37f89ff
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_2_segment_editor_update.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:da1d6859fbe0ff8a753478cc2cb37c89587a478d74844b5bc8a5fd98e3778d57
+size 40236
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png
new file mode 100644
index 0000000000..6ac74e3a9e
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_3_segment_editor_edit_name.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:82390d3d96745addcfe6da4c93b8208772df3f10025bae02eaf1d287af8d2a5f
+size 39099
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_different.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_different.png
new file mode 100644
index 0000000000..261724743e
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_different.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f9b55256baaa04697bad35adaeca81769ad177c91723b86f8650d5a3659c9cef
+size 33680
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png
new file mode 100644
index 0000000000..1b41ec8317
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_6_segment_editor_droplist.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:76e27eaa44db0cb26d93b4e8c8e566b343a9447d520fb88c2b65a075ba6e9129
+size 43115
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_7_segment_editor_closed.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_7_segment_editor_closed.png
new file mode 100644
index 0000000000..270c63aac5
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_7_segment_editor_closed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1d2581e3c4e0639bb0adb30069c7474daea04c0a3c5a3ca497367b1436434143
+size 1287
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_8_segment_editor_create.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_8_segment_editor_create.png
new file mode 100644
index 0000000000..261724743e
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_8_segment_editor_create.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f9b55256baaa04697bad35adaeca81769ad177c91723b86f8650d5a3659c9cef
+size 33680
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_and_condition.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_and_condition.png
new file mode 100644
index 0000000000..5beae76578
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_and_condition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f26b56a1d06e46f0bc091a431742c4aabeffda516067c8ac1ef4ecdbfc016e0e
+size 47295
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_or_condition.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_or_condition.png
new file mode 100644
index 0000000000..00e1608827
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_add_new_or_condition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:745c6d4feb3336c84b66b0e55a60d69aae371599d87558fd5661e4ce13802a0c
+size 38060
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted.png
new file mode 100644
index 0000000000..1ea5114ca3
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f8ce932f4790d07b8e43855b6c06efb2305c65bc65bf2847cc60d9427d5f424
+size 16383
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png
new file mode 100644
index 0000000000..f63229fb05
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_dialog.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f365ce945d8de57f5374439bfc5e912e33a1d0179dffe479eb8b9465278da595
+size 8368
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_reload.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_reload.png
new file mode 100644
index 0000000000..1ea5114ca3
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_deleted_reload.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f8ce932f4790d07b8e43855b6c06efb2305c65bc65bf2847cc60d9427d5f424
+size 16383
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png
new file mode 100644
index 0000000000..b9e8c965d4
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_dimension_drag_drop.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:640906effe393ab44e86c05640235672665d771c0c13cfe2e899923ba42170ee
+size 32604
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png
new file mode 100644
index 0000000000..26da5cbf5d
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_and_condition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b5a9a5d97311876d593b67c37a7e23f1209b389561fa4d413fc343b1f63e211
+size 46351
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png
new file mode 100644
index 0000000000..19c8bf3a12
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_drag_or_condition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:400899dd434c8d84121bb4593cb22a744c18b9c85b7a5aa60f069fe3dc28494c
+size 37097
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png
new file mode 100644
index 0000000000..e22d04c21b
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d1cec0c447915f235ba4ef30e8af51c4105d157f95d9f8b24d6e44d057dc6a8
+size 17969
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png
new file mode 100644
index 0000000000..dd20a27520
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_details.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7e98bc257c8dc43d9e90546560d8df4b5b920906d8bc7d5e2cc9caf234ca0304
+size 48584
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png
new file mode 100644
index 0000000000..e22d04c21b
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_saved_reload.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d1cec0c447915f235ba4ef30e8af51c4105d157f95d9f8b24d6e44d057dc6a8
+size 17969
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_update_confirmation.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_update_confirmation.png
new file mode 100644
index 0000000000..b6a14bfb71
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_update_confirmation.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2e1c17ca95cf4e6363c2aec1d819f5246c5ad8ecbf919065f31e16302cfeaa18
+size 32536
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png
new file mode 100644
index 0000000000..ad13051667
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:74c90ef5b02b1e8f7bb817d4aeb3924004ed0f739c5e4e4605649221b6da160c
+size 18046
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
new file mode 100644
index 0000000000..051051229b
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:79f1f6fdb2afa9551a17a2cfbdd7f1a8bb113596db9284ef832ed0849d1697e3
+size 51331
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png
new file mode 100644
index 0000000000..ad13051667
--- /dev/null
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_reload.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:74c90ef5b02b1e8f7bb817d4aeb3924004ed0f739c5e4e4605649221b6da160c
+size 18046
diff --git a/plugins/SitesManager/tests/UI/SitesManager_spec.js b/plugins/SitesManager/tests/UI/SitesManager_spec.js
new file mode 100644
index 0000000000..3e21e12f26
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/SitesManager_spec.js
@@ -0,0 +1,88 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * SitesManager screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("SitesManager", function () {
+ this.timeout(0);
+ this.fixture = "Piwik\\Plugins\\SitesManager\\tests\\Fixtures\\ManySites";
+
+ var url = "?module=SitesManager&action=index&idSite=1&period=day&date=yesterday&showaddsite=false";
+
+ function assertScreenshotEquals(screenshotName, done, test)
+ {
+ expect.screenshot(screenshotName).to.be.captureSelector('#content', test, done);
+ }
+
+ function loadNextPage(page)
+ {
+ page.click('.SitesManager .paging:first .next');
+ }
+
+ function loadPreviousPage(page)
+ {
+ page.click('.SitesManager .paging:first .prev');
+ }
+
+ function searchForText(page, textToAppendToSearchField)
+ {
+ page.sendKeys(".SitesManager .search:first input", textToAppendToSearchField);
+ page.click('.SitesManager .search:first img');
+ page.wait(150);
+ }
+
+ it("should load correctly and show page 0", function (done) {
+ assertScreenshotEquals("loaded", done, function (page) {
+ page.load(url);
+ });
+ });
+
+ it("should show page 1 when clicking next", function (done) {
+ assertScreenshotEquals("page_1", done, function (page) {
+ loadNextPage(page);
+ });
+ });
+
+ it("should show page 2 when clicking next", function (done) {
+ assertScreenshotEquals("page_2", done, function (page) {
+ loadNextPage(page);
+ });
+ });
+
+ it("should show page 1 when clicking prev", function (done) {
+ assertScreenshotEquals("page_1_again", done, function (page) {
+ loadPreviousPage(page);
+ });
+ });
+
+ it("should search for websites and reset page to 0", function (done) {
+ assertScreenshotEquals("search", done, function (page) {
+ searchForText(page, 'SiteTes');
+ });
+ });
+
+ it("should page within search result to page 1", function (done) {
+ assertScreenshotEquals("search_page_1", done, function (page) {
+ loadNextPage(page);
+ });
+ });
+
+ it("should search for websites no result", function (done) {
+ assertScreenshotEquals("search_no_result", done, function (page) {
+ searchForText(page, 'RanDoMSearChTerm');
+ });
+ });
+
+ it("should load the global settings page", function (done) {
+ assertScreenshotEquals("global_settings", done, function (page) {
+ page.load('?module=SitesManager&action=globalSettings&idSite=1&period=day&date=yesterday&showaddsite=false');
+ page.evaluate(function () {
+ $('.form-help:contains(UTC time is)').hide();
+ });
+ });
+ });
+}); \ No newline at end of file
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_global_settings.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_global_settings.png
new file mode 100644
index 0000000000..d2efbb0e53
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_global_settings.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd7785c0fc20c5762a867502aa34eda81e67882d4e33244fc93a2eddb1bf57ea
+size 265717
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_loaded.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_loaded.png
new file mode 100644
index 0000000000..b38a71ab2e
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_loaded.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:217be30852c53a2833f9b8f7aeddc0bd1b58b0438a8a4b295b66d0fe57a36651
+size 166501
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1.png
new file mode 100644
index 0000000000..716940e9ee
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2a37b03f7da4f40654829523a95dd4a4fd1dd45b1f2ccafea5f8425e99310391
+size 171272
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1_again.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1_again.png
new file mode 100644
index 0000000000..690fa8aef4
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_1_again.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:74f547c92a5f8208131677343ff28d368a72e4fd846f5e52e3fc07a3f382dadd
+size 171294
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_2.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_2.png
new file mode 100644
index 0000000000..f6507d8470
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_page_2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:903b496b77fd035a6aa9f04e95cc578c00588bde4e8e09f4890b236fff3b1a19
+size 173214
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search.png
new file mode 100644
index 0000000000..d48315bb47
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6a908ca9c94a331261bc247382587d999d85453e1256116fcf39c98fbdbb2a1
+size 164757
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_no_result.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_no_result.png
new file mode 100644
index 0000000000..8570c22b95
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_no_result.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:238224decfa68bfc3f6c1f2bc7d244b1aae18da067073960150ed87b978f8524
+size 44695
diff --git a/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_page_1.png b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_page_1.png
new file mode 100644
index 0000000000..6d8547aa4a
--- /dev/null
+++ b/plugins/SitesManager/tests/UI/expected-screenshots/SitesManager_search_page_1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7ef236adfbf0e5b0c06d295af9044e43018d04d8cff1f4c46c54b3b270dc8ecf
+size 169348
diff --git a/plugins/TestRunner/Commands/SyncScreenshots.php b/plugins/TestRunner/Commands/SyncScreenshots.php
index 1ce6fa4828..2d3d21c598 100644
--- a/plugins/TestRunner/Commands/SyncScreenshots.php
+++ b/plugins/TestRunner/Commands/SyncScreenshots.php
@@ -10,6 +10,7 @@ namespace Piwik\Plugins\TestRunner\Commands;
use Piwik\Container\StaticContainer;
use Piwik\Development;
+use Piwik\Filesystem;
use Piwik\Http;
use Piwik\Plugin\ConsoleCommand;
use Psr\Log\LoggerInterface;
@@ -51,7 +52,7 @@ class SyncScreenshots extends ConsoleCommand
$this->addArgument('buildnumber', InputArgument::REQUIRED, 'Travis build number you want to sync.');
$this->addArgument('screenshotsRegex', InputArgument::OPTIONAL,
'A regex to use when selecting screenshots to copy. If not supplied all screenshots are copied.', '.*');
- $this->addOption('repository', 'r', InputOption::VALUE_OPTIONAL, 'Repository name you want to sync screenshots for.', 'piwik/piwik');
+ $this->addOption('repository', 'r', InputOption::VALUE_OPTIONAL, 'Repository name you want to sync screenshots for.', 'matomo-org/matomo');
$this->addOption('http-user', '', InputOption::VALUE_OPTIONAL, 'the HTTP AUTH username (for premium plugins where artifacts are protected)');
$this->addOption('http-password', '', InputOption::VALUE_OPTIONAL, 'the HTTP AUTH password (for premium plugins where artifacts are protected)');
}
@@ -109,7 +110,7 @@ class SyncScreenshots extends ConsoleCommand
private function downloadScreenshot($url, $repository, $screenshot, $httpUser, $httpPassword)
{
- $downloadTo = $this->getDownloadToPath($repository) . $screenshot;
+ $downloadTo = $this->getDownloadToPath($repository, $screenshot) . $screenshot;
$url = 'https://builds-artifacts.piwik.org' . $url;
$this->logger->debug("Downloading {url} to {destination}", array('url' => $url, 'destination' => $downloadTo));
@@ -156,9 +157,9 @@ cd ../../../../../";
$output->writeln($commands);
}
- private function getDownloadToPath($repository)
+ private function getDownloadToPath($repository, $fileName=false)
{
- $plugin = $this->getPluginName($repository);
+ $plugin = $this->getPluginName($repository, $fileName);
if (empty($plugin)) {
return PIWIK_DOCUMENT_ROOT . "/tests/UI/expected-screenshots/";
@@ -184,13 +185,28 @@ cd ../../../../../";
throw new \Exception("Download to path could not be found: $downloadTo");
}
- private function getPluginName($repository)
+ private function getPluginName($repository, $fileName)
{
list($org, $repository) = explode('/', $repository, 2);
if (strpos($repository, 'plugin-') === 0) {
return substr($repository, strlen('plugin-'));
}
+
+ // determine plugin based on the test name
+ if (!empty($fileName)) {
+ list($testName, $_null) = explode('_', $fileName, 2);
+ $foundExistingFiles = Filesystem::globr(PIWIK_DOCUMENT_ROOT, $fileName);
+ $foundTestSpecs = Filesystem::globr(PIWIK_DOCUMENT_ROOT, $testName.'_spec.js');
+ $filesToCheck = $foundExistingFiles + $foundTestSpecs;
+
+ foreach ($filesToCheck as $file) {
+ if (preg_match('/plugins\/([^\/]+)\//i', $file, $plugin)) {
+ return $plugin[1];
+ }
+ }
+ }
+
return null;
}
}
diff --git a/plugins/Transitions/tests/UI/Transitions_spec.js b/plugins/Transitions/tests/UI/Transitions_spec.js
new file mode 100644
index 0000000000..b79a5e5868
--- /dev/null
+++ b/plugins/Transitions/tests/UI/Transitions_spec.js
@@ -0,0 +1,34 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * transitions screenshot tests
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("Transitions", function () {
+ this.timeout(0);
+
+ var generalParams = 'idSite=1&period=year&date=2012-08-09',
+ urlBase = 'module=CoreHome&action=index&' + generalParams
+ ;
+
+ it('should load the transitions popup correctly for the page titles report', function (done) {
+ expect.screenshot('transitions_popup_titles').to.be.captureSelector('.ui-dialog', function (page) {
+ page.load("?" + urlBase + "#?" + generalParams + "&category=General_Actions&subcategory=Actions_SubmenuPageTitles");
+
+ page.mouseMove('div.dataTable tbody tr:eq(2)');
+ page.mouseMove('a.actionTransitions:visible'); // necessary to get popover to display
+ page.click('a.actionTransitions:visible');
+ }, done);
+ });
+
+ it('should load the transitions popup correctly for the page urls report', function (done) {
+ expect.screenshot('transitions_popup_urls').to.be.captureSelector('.ui-dialog', function (page) {
+ page.load("?" + urlBase + "#?" + generalParams + "&category=General_Actions&subcategory=General_Pages&"
+ + "popover=RowAction$3ATransitions$3Aurl$3Ahttp$3A$2F$2Fpiwik.net$2Fdocs$2Fmanage-websites$2F");
+ page.mouseMove('.Transitions_CurveTextRight');
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_titles.png b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_titles.png
new file mode 100644
index 0000000000..eede459b92
--- /dev/null
+++ b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_titles.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b1c1825ad7948953540d55e236979e6875f6917c251a41257c841cfb92013ad5
+size 41518
diff --git a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png
new file mode 100644
index 0000000000..2d158129c2
--- /dev/null
+++ b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d8afe9fc3f50b8b6ccf86f55cf447d5f5cd3953f63b07c5434c720d44733e2eb
+size 65920
diff --git a/plugins/UserCountry/tests/System/AttributeHistoricalDataWithLocationsTest.php b/plugins/UserCountry/tests/System/AttributeHistoricalDataWithLocationsTest.php
index 546236e9a6..7265f6bce9 100644
--- a/plugins/UserCountry/tests/System/AttributeHistoricalDataWithLocationsTest.php
+++ b/plugins/UserCountry/tests/System/AttributeHistoricalDataWithLocationsTest.php
@@ -20,7 +20,7 @@ use Symfony\Component\Console\Tester\CommandTester;
/**
* Class AttributeHistoricalDataWithLocationsTest
- * @package Piwik\Plugins\UserCountry\Test\Integration
+ * @package Piwik\Plugins\UserCountry\tests\Integration
*
* @group UserCountry
* @group AttributeHistoricalDataWithLocations
diff --git a/plugins/UserCountryMap/tests/UI/VisitorMap_spec.js b/plugins/UserCountryMap/tests/UI/VisitorMap_spec.js
new file mode 100644
index 0000000000..c8685a3e7f
--- /dev/null
+++ b/plugins/UserCountryMap/tests/UI/VisitorMap_spec.js
@@ -0,0 +1,60 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * Visitor Map screenshot tests.
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("VisitorMap", function () {
+ this.timeout(0);
+
+ var url = "?module=Widgetize&action=iframe&moduleToWidgetize=UserCountryMap&idSite=1&period=year&date=2012-08-09&"
+ + "actionToWidgetize=visitorMap&viewDataTable=table&filter_limit=5&isFooterExpandedInDashboard=1",
+ urlWithCities = "?module=Widgetize&action=iframe&moduleToWidgetize=UserCountryMap&idSite=3&period=week&date=yesterday&"
+ + "actionToWidgetize=visitorMap&viewDataTable=table&filter_limit=5&isFooterExpandedInDashboard=1";
+
+ it("should display the bounce rate metric correctly", function (done) {
+ this.retries(3);
+
+ expect.screenshot('bounce_rate').to.be.similar(0.002).to.capture(function (page) {
+ page.load(url);
+ page.evaluate(function () {
+ $('.userCountryMapSelectMetrics').val('bounce_rate').trigger('change');
+ });
+ page.mouseMove('.UserCountryMap_map.kartograph');
+ }, done);
+ });
+
+ it("should display the average time on site metric correctly", function (done) {
+ expect.screenshot('avg_time_on_site').to.be.similar(0.002).to.capture(function (page) {
+ page.evaluate(function () {
+ $('.userCountryMapSelectMetrics').val('avg_time_on_site').trigger('change');
+ });
+ page.mouseMove('.UserCountryMap_map.kartograph');
+ }, done);
+ });
+
+ it("should display the regions layer correctly", function (done) {
+ expect.screenshot('regions').to.be.similar(0.002).to.capture(function (page) {
+ page.load(urlWithCities);
+ page.evaluate(function () {
+ // zoom into USA
+ var path = window.visitorMap.map.getLayer('countries').getPaths({iso: "USA"})[0].svgPath[0];
+ $(path).click();
+ });
+ page.evaluate(function () {
+ // go to regions view
+ var path = window.visitorMap.map.getLayer('countries').getPaths({iso: "USA"})[0].svgPath[0];
+ $(path).click();
+ });
+ }, done);
+ });
+
+ it("should display the cities layer correctly", function (done) {
+ expect.screenshot('cities').to.be.similar(0.002).to.capture(function (page) {
+ page.click('.UserCountryMap-btn-city');
+ }, done);
+ });
+});
diff --git a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_avg_time_on_site.png b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_avg_time_on_site.png
new file mode 100644
index 0000000000..ceb7af09ad
--- /dev/null
+++ b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_avg_time_on_site.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b700da83b5b12979d23b2f2d068d6ecf27595ddcffcf8082363c0d4ebec3de17
+size 189886
diff --git a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_bounce_rate.png b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_bounce_rate.png
new file mode 100644
index 0000000000..c4026194f2
--- /dev/null
+++ b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_bounce_rate.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:43f1e81a0a440b37126fbc028a971e742b103721f59a4ce6b5f362fbb904b0d2
+size 189092
diff --git a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png
new file mode 100644
index 0000000000..30a9ce43e4
--- /dev/null
+++ b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9f3f0e40d23b460a7efca8b67d312418ccb95e17db83913fdec72037291aabf0
+size 117136
diff --git a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png
new file mode 100644
index 0000000000..0ccb5cf81e
--- /dev/null
+++ b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:23c6affafe3db866251746f771e2c2fe48d09150fceb4d8f1c60bcdfb4596337
+size 116052
diff --git a/plugins/UsersManager/tests/UI/UsersManager_spec.js b/plugins/UsersManager/tests/UI/UsersManager_spec.js
new file mode 100644
index 0000000000..a71585d776
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/UsersManager_spec.js
@@ -0,0 +1,110 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * UsersManager screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("UsersManager", function () {
+ this.timeout(0);
+ this.fixture = "Piwik\\Plugins\\UsersManager\\tests\\Fixtures\\ManyUsers";
+
+ var url = "?module=UsersManager&action=index";
+
+ function assertScreenshotEquals(screenshotName, done, test)
+ {
+ expect.screenshot(screenshotName).to.be.captureSelector('#content', test, done);
+ }
+
+ function openGiveAccessForm(page) {
+ page.click('#showGiveViewAccessForm');
+ }
+
+ function setLoginOrEmailForGiveAccessForm(page, loginOrEmail)
+ {
+ page.evaluate(function () {
+ $('#user_invite').val('');
+ });
+ page.sendKeys('#user_invite', loginOrEmail);
+ }
+
+ function submitGiveAccessForm(page)
+ {
+ page.click('#giveUserAccessToViewReports');
+ page.wait(1000); // we wait in case error notification is still fading in and not fully visible yet
+ }
+
+ before(function () {
+ testEnvironment.idSitesAdminAccess = [1,2];
+ testEnvironment.save();
+ });
+
+ after(function () {
+ delete testEnvironment.idSitesAdminAccess;
+ testEnvironment.save();
+ });
+
+ it("should show only users having access to same site", function (done) {
+ assertScreenshotEquals("loaded_as_admin", done, function (page) {
+ page.load(url);
+ });
+ });
+
+ it("should open give view access form when clicking on button", function (done) {
+ assertScreenshotEquals("adminuser_give_view_access_form_opened", done, function (page) {
+ openGiveAccessForm(page);
+ });
+ });
+
+ it("should show an error when nothing entered", function (done) {
+ assertScreenshotEquals("adminuser_give_view_access_no_user_entered", done, function (page) {
+ submitGiveAccessForm(page);
+ });
+ });
+
+ it("should show an error when no such user found", function (done) {
+ assertScreenshotEquals("adminuser_give_view_access_user_not_found", done, function (page) {
+ setLoginOrEmailForGiveAccessForm(page, 'anyNoNExistingUser');
+ submitGiveAccessForm(page);
+ });
+ });
+
+ it("should show an error if user already has access", function (done) {
+ assertScreenshotEquals("adminuser_give_view_access_user_already_has_access", done, function (page) {
+ setLoginOrEmailForGiveAccessForm(page, 'login2');
+ submitGiveAccessForm(page);
+ });
+ });
+
+ it("should add a user by login", function (done) {
+ assertScreenshotEquals("adminuser_give_view_access_via_login", done, function (page) {
+ setLoginOrEmailForGiveAccessForm(page, 'login3');
+ submitGiveAccessForm(page);
+ });
+ });
+
+ it("should add a user by email", function (done) {
+ assertScreenshotEquals("adminuser_give_view_access_via_email", done, function (page) {
+ page.load(url);
+ openGiveAccessForm(page);
+ setLoginOrEmailForGiveAccessForm(page, 'login4@example.com');
+ submitGiveAccessForm(page);
+ });
+ });
+
+ it("should ask for confirmation when all sites selected", function (done) {
+ assertScreenshotEquals("adminuser_all_users_loaded", done, function (page) {
+ page.load(url + '&idSite=all');
+ });
+ });
+
+ it("should ask for confirmation when all sites selected", function (done) {
+ expect.screenshot("adminuser_all_users_confirmation").to.be.captureSelector('.modal.open', function (page) {
+ openGiveAccessForm(page);
+ setLoginOrEmailForGiveAccessForm(page, 'login5@example.com');
+ submitGiveAccessForm(page);
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_confirmation.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_confirmation.png
new file mode 100644
index 0000000000..581f611560
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_confirmation.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:11c48ece38d9abef30802e75b62a56b84f8ee3e7d230816f0f58159a5187102f
+size 10597
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_loaded.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_loaded.png
new file mode 100644
index 0000000000..5ec6df9cef
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_all_users_loaded.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e660cd6b1bb5e0bf50f0aca4a28831b815533a27341ab99b86970e16f1764355
+size 42243
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_form_opened.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_form_opened.png
new file mode 100644
index 0000000000..c370b52203
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_form_opened.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1fdc5d9b76a3085811d7fbbccb42f24592dfd11c0e9b7a19e8040d1f937106fc
+size 39943
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_no_user_entered.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_no_user_entered.png
new file mode 100644
index 0000000000..13ff548721
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_no_user_entered.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:703dc27015f7faf13db1498e0783eed55ed6d5b77851b0da818b094ce9358953
+size 46249
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_already_has_access.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_already_has_access.png
new file mode 100644
index 0000000000..c0204ee9aa
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_already_has_access.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9a00cdcfd15f3d5847002ad30fd1e0625ae256d1fbce434b35251757583ade46
+size 46924
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_not_found.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_not_found.png
new file mode 100644
index 0000000000..b83c91c2ed
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_user_not_found.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7474eb5cc4886b2be5010ea91768370aa3be04b2fcd75569df0da9b27968886d
+size 48719
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_email.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_email.png
new file mode 100644
index 0000000000..3b854e5a7f
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_email.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d9cf30b1a30dc51994e2609144c1d1d64e6aa8ec856e9299383609eed4840c5f
+size 42097
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_login.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_login.png
new file mode 100644
index 0000000000..351528b6fa
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_adminuser_give_view_access_via_login.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b31b8538a66d44eca57f52bc0d9cb92ddea34115baecd0f37cbb89847097ef54
+size 39387
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_loaded_as_admin.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_loaded_as_admin.png
new file mode 100644
index 0000000000..d06883d00c
--- /dev/null
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_loaded_as_admin.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d99fd7d260f0a95a804801e0c76567fda00341f64a1c85a5249a276ac8accfc
+size 36694