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:
Diffstat (limited to 'tests/UI/specs/UIIntegration_spec.js')
-rw-r--r--tests/UI/specs/UIIntegration_spec.js33
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index a7d781ae69..814a8526b5 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -420,6 +420,13 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
}, done);
});
+ it('should load the ecommerce log page with segment', function (done) {
+ this.retries(3);
+ expect.screenshot('ecommerce_log_segmented').to.be.captureSelector('.pageWrap', function (page) {
+ page.load("?" + urlBase + "&segment=countryCode%3D%3DUS#?" + generalParams + "&category=Goals_Ecommerce&subcategory=Goals_EcommerceLog&segment=countryCode%3D%3DUS");
+ }, done);
+ });
+
it('should load the ecommerce products page', function (done) {
expect.screenshot('ecommerce_products').to.be.captureSelector('.pageWrap,.dataTable', function (page) {
page.load("?" + urlBase + "#?" + generalParams + "&category=Goals_Ecommerce&subcategory=Goals_Products");
@@ -562,6 +569,30 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
expect.screenshot('fatal_error_safemode').to.be.capture(function (page) {
page.load("?" + generalParams + "&module=CorePluginsAdmin&action=safemode&idSite=1&period=day&date=yesterday&activated"
+ "&error_message=" + message + "&error_file=" + file + "&error_line=" + line + "&tests_hide_piwik_version=1");
+ page.evaluate(function () {
+ var elements = document.querySelectorAll('table tr td:nth-child(2)');
+ for (var i in elements) {
+ if (elements.hasOwnProperty(i) && elements[i].innerText.match(/^[0-9]\.[0-9]\.[0-9]$/)) {
+ elements[i].innerText = '3.0.0'
+ }
+ }
+ });
+ }, done);
+ });
+
+ // invalid site parameter
+ it('should show login form for non super user if invalid idsite given', function (done) {
+ testEnvironment.testUseMockAuth = 0;
+ testEnvironment.save();
+
+ expect.screenshot('invalid_idsite').to.be.capture(function (page) {
+ page.load("?module=CoreHome&action=index&idSite=10006&period=week&date=2017-06-04");
+ }, done);
+ });
+
+ it('should show error for super user if invalid idsite given', function (done) {
+ expect.screenshot('invalid_idsite_superuser').to.be.capture(function (page) {
+ page.load("?module=CoreHome&action=index&idSite=10006&period=week&date=2017-06-04");
}, done);
});
@@ -641,7 +672,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
page.load("?" + generalParams + "&module=Feedback&action=index");
page.evaluate(function () {
- $('.enrichedHeadline span').each(function () {
+ $('.enrichedHeadline .title').each(function () {
if ($(this).text().indexOf("Piwik") !== -1) {
var replace = $(this).text().replace(/Piwik\s*\d+\.\d+(\.\d+)?([\-a-z]*\d+)?/g, 'Piwik');
$(this).text(replace);