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 'plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js')
-rw-r--r--plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
index 2847220768..35179aa6eb 100644
--- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
+++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
@@ -53,7 +53,7 @@ describe("SegmentSelectorEditorTest", function () {
it("should start editing segment name when segment name edit link clicked", async function() {
await page.click('.segmentEditorPanel .editSegmentName');
- await page.waitFor(250); // animation
+ await page.waitForTimeout(250); // animation
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('3_segment_editor_edit_name');
});
@@ -81,7 +81,7 @@ describe("SegmentSelectorEditorTest", function () {
await page.click('.segmentationContainer .title');
await page.click('.add_new_segment');
await page.waitForNetworkIdle();
- await page.waitFor('.segmentRow0');
+ await page.waitForSelector('.segmentRow0');
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('8_segment_editor_create');
});
@@ -94,13 +94,13 @@ describe("SegmentSelectorEditorTest", function () {
it("should show suggested segment values when a segment value input is focused", async function() {
await page.click('.segmentEditorPanel .segmentRow0 .ui-autocomplete-input');
await page.waitForNetworkIdle();
- await page.waitFor(500);
+ await page.waitForTimeout(500);
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('suggested_values');
});
it("should add an OR condition when clicking on add OR", async function() {
await page.click('.segmentEditorPanel .segment-add-or');
- await page.waitFor(() => !! $('.segmentRow0 .segment-rows>div:eq(1)').length);
+ await page.waitForFunction(() => !! $('.segmentRow0 .segment-rows>div:eq(1)').length);
await page.waitForNetworkIdle();
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('add_new_or_condition');
});
@@ -113,7 +113,7 @@ describe("SegmentSelectorEditorTest", function () {
it("should add an AND condition when clicking on add AND", async function() {
await page.click('.segmentEditorPanel .segment-add-row');
- await page.waitFor('.segmentRow1');
+ await page.waitForSelector('.segmentRow1');
await page.waitForNetworkIdle();
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('add_new_and_condition');
});
@@ -138,7 +138,7 @@ describe("SegmentSelectorEditorTest", function () {
$('button.saveAndApply').click();
});
await page.waitForNetworkIdle();
- await page.waitFor('.segmentationContainer');
+ await page.waitForSelector('.segmentationContainer');
await page.click('.segmentationContainer');
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('saved');
@@ -177,8 +177,8 @@ describe("SegmentSelectorEditorTest", function () {
await page.evaluate(function () {
$('button.saveAndApply').click();
});
- await page.waitFor('.modal.open');
- await page.waitFor(500); // animation to show confirm
+ await page.waitForSelector('.modal.open');
+ await page.waitForTimeout(500); // animation to show confirm
const modal = await page.$('.modal.open');
expect(await modal.screenshot()).to.matchImage('update_confirmation');
@@ -203,14 +203,14 @@ describe("SegmentSelectorEditorTest", function () {
await page.click('.segmentList li[data-idsegment="4"] .editSegment');
await page.waitForNetworkIdle();
- await page.waitFor('.segmentListContainer .metricValueBlock');
+ await page.waitForSelector('.segmentListContainer .metricValueBlock');
expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('updated_details');
});
it("should correctly show delete dialog when the delete link is clicked", async function() {
await page.click('.segmentEditorPanel a.delete');
- await page.waitFor(500); // animation
+ await page.waitForTimeout(500); // animation
const modal = await page.$('.modal.open');
expect(await modal.screenshot()).to.matchImage('deleted_dialog');
@@ -241,7 +241,7 @@ describe("SegmentSelectorEditorTest", function () {
await page.click('a.add_new_segment');
await page.type('input.edit_segment_name', 'complex segment');
- await page.waitFor('.segmentRow0');
+ await page.waitForSelector('.segmentRow0');
await selectDimension('.segmentRow0', 'Visitors', 'Browser');
await selectFieldValue('.segmentRow0 .segment-row:eq(0) .metricMatchBlock', 'Is not');
@@ -251,7 +251,7 @@ describe("SegmentSelectorEditorTest", function () {
});
await page.click('.segment-add-or');
- await page.waitFor(() => !! $('.segmentRow0 .segment-row:eq(1)').length);
+ await page.waitForFunction(() => !! $('.segmentRow0 .segment-row:eq(1)').length);
// configure or condition
await selectDimension('.segmentRow0 .segment-row:eq(1)', 'Visitors', 'Browser');
@@ -263,7 +263,7 @@ describe("SegmentSelectorEditorTest", function () {
});
await page.click('.segment-add-row');
- await page.waitFor('.segmentRow1 .segment-row');
+ await page.waitForSelector('.segmentRow1 .segment-row');
// configure and condition
await selectDimension('.segmentRow1', 'Visitors', 'Browser');
@@ -278,7 +278,7 @@ describe("SegmentSelectorEditorTest", function () {
});
await page.waitForNetworkIdle();
- await page.waitFor('.dataTable');
+ await page.waitForSelector('.dataTable');
await page.waitForNetworkIdle();
expect(await page.screenshot()).to.matchImage('complex_segment');