From 8339dbfd164b8da8278ed8db4d360369e691d148 Mon Sep 17 00:00:00 2001 From: Sumedha Pramod Date: Tue, 24 Apr 2018 14:07:36 -0400 Subject: [PATCH] Chore: Ensure all new drawings get deleted in functional tests (#181) --- functional-tests/tests/draw.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/functional-tests/tests/draw.js b/functional-tests/tests/draw.js index 0198c5188..5b7a5e057 100644 --- a/functional-tests/tests/draw.js +++ b/functional-tests/tests/draw.js @@ -90,7 +90,7 @@ Scenario('Create/Delete a drawing annotation w/ drawing dialog @desktop', (I) => I.waitForInvisible(SELECTOR_ANNOTATION_DRAWING_DIALOG); I.click(SELECTOR_ANNOTATION_BUTTON_DRAW_POST); - I.say('Select drawing') + I.say('Select drawing'); clickAtLocation(I, SELECTOR_TEXT_LAYER, 300); I.scrollTo(SELECTOR_ANNOTATION_DRAWING_DIALOG); I.waitForVisible(SELECTOR_ANNOTATION_DRAWING_DIALOG); @@ -119,4 +119,17 @@ Scenario('Create a drawing annotation by exiting mode @desktop', (I) => { I.say('Save drawing'); I.click(SELECTOR_ANNOTATION_BUTTON_DRAW_POST); I.waitForInvisible(SELECTOR_ANNOTATION_DRAWING_DIALOG); + + I.say('Select drawing'); + clickAtLocation(I, SELECTOR_TEXT_LAYER, 300); + I.scrollTo(SELECTOR_ANNOTATION_DRAWING_DIALOG); + I.waitForVisible(SELECTOR_ANNOTATION_DRAWING_DIALOG); + + I.say('Drawing should have a boundary and dialog should appear'); + I.waitForText('Kanye West drew', 9, SELECTOR_ANNOTATION_DRAWING_LABEL); + I.waitForEnabled(SELECTOR_DELETE_DRAWING_BTN); + + I.say('Delete drawing'); + I.click(SELECTOR_DELETE_DRAWING_BTN); + I.waitForInvisible(SELECTOR_ANNOTATION_DRAWING_DIALOG); }); \ No newline at end of file