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:
authordizzy <diosmosis@users.noreply.github.com>2022-03-31 16:20:54 +0300
committerGitHub <noreply@github.com>2022-03-31 16:20:54 +0300
commit19489d103c6b4e91a745492e7ccffd957c3dcb4f (patch)
tree5bfcf0bbb6d2725876a01935f35500e7380e1595 /plugins/SegmentEditor/tests
parent09e1412dcd0e142c760eb5447af254a817b7b056 (diff)
[Vue] migrate segment generator directive to Vue (#18993)
* start migrating segment generator directive * get to build * remove some TODO * rebuilt * get UI tests to pass * fix ng-model handling * remote todo * built vue files
Diffstat (limited to 'plugins/SegmentEditor/tests')
-rw-r--r--plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
index cb183b952c..e5a05fcf4a 100644
--- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
+++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
@@ -114,14 +114,16 @@ describe("SegmentSelectorEditorTest", function () {
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", async function() {
await page.evaluate(function () {
- $('.metricValueBlock input').each(function (index) {
- $(this).val('value ' + index).change();
+ $('.metricValueBlock input').each(function (index, elem) {
+ $(elem).val('value ' + index).change();
});
});
await page.type('input.edit_segment_name', 'new segment');
await page.click('.segmentRow0 .segment-or'); // click somewhere else to save new name
+ await page.waitForTimeout(200);
+
await page.evaluate(function () {
$('button.saveAndApply').click();
});
@@ -164,8 +166,10 @@ describe("SegmentSelectorEditorTest", function () {
});
});
+ await page.waitFor(200);
+
await page.evaluate(function () {
- $('button.saveAndApply').click();
+ $('button.saveAndApply').click();
});
await page.waitForSelector('.modal.open');
await page.waitForTimeout(500); // animation to show confirm
@@ -289,6 +293,9 @@ describe("SegmentSelectorEditorTest", function () {
var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3';
$('.segmentRow1 .metricValueBlock input').val(complexValue).change();
});
+
+ await page.waitFor(200);
+
await page.evaluate(function () {
$('button.saveAndApply').click();
});
@@ -331,6 +338,8 @@ describe("SegmentSelectorEditorTest", function () {
console.log(dialog.message());
});
+ await page.waitFor(200);
+
await page.evaluate(function () {
$('button.saveAndApply').click();
});