From 6977ba75e60164c6dbe6bd06d6b5588e9714b18c Mon Sep 17 00:00:00 2001 From: sgiehl <stefan@piwik.org> Date: Tue, 31 May 2016 21:21:55 +0200 Subject: [PATCH] refs #9984 - adjust UI test to automatically confirm confirmation --- tests/UI/specs/SegmentSelectorEditor_spec.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/UI/specs/SegmentSelectorEditor_spec.js b/tests/UI/specs/SegmentSelectorEditor_spec.js index c28c9e6cb4..0fec52330f 100644 --- a/tests/UI/specs/SegmentSelectorEditor_spec.js +++ b/tests/UI/specs/SegmentSelectorEditor_spec.js @@ -130,8 +130,8 @@ describe("SegmentSelectorEditorTest", function () { }, done); }); - it("should correctly update the segment when its details are changed and saved", function (done) { - expect.screenshot("updated").to.be.captureSelector(selectorsToCapture, function (page) { + it("should correctly should show a confirmation when changing segment definition", function (done) { + expect.screenshot("update_confirmation").to.be.captureSelector('.ui-dialog', function (page) { page.click('.segmentEditorPanel .editSegmentName'); page.evaluate(function () { $('input.edit_segment_name').val(''); @@ -150,7 +150,12 @@ describe("SegmentSelectorEditorTest", function () { }); page.click('button.saveAndApply'); + }, done); + }); + it("should correctly update the segment when saving confirmed", function (done) { + expect.screenshot("updated").to.be.captureSelector(selectorsToCapture, function (page) { + page.click('.ui-dialog button:contains(Yes)'); page.click('.segmentationContainer'); }, done); }); -- GitLab