From 91fbbc198ad952fde81804f6dd91e475ad6d0ce8 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Mon, 28 Apr 2014 10:07:36 -0400 Subject: tests: wait until contact editor is hidden while saving --- tests/addressbook.feature | 1 + tests/steps/addressbook_steps.py | 2 ++ 2 files changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/addressbook.feature b/tests/addressbook.feature index 4e318e83df..f7e33a6287 100644 --- a/tests/addressbook.feature +++ b/tests/addressbook.feature @@ -95,6 +95,7 @@ Feature: Addressbook: File: Create contacts In vitae ligula risus. Nunc venenatis leo vel leo facilisis porta. Nam sed magna urna, venenatis. """ + * Save the contact * Refresh addressbook * Select "Doe, Jimmy" contact * Open contact editor for selected contact diff --git a/tests/steps/addressbook_steps.py b/tests/steps/addressbook_steps.py index d515be5da5..2f254e8b1f 100644 --- a/tests/steps/addressbook_steps.py +++ b/tests/steps/addressbook_steps.py @@ -123,6 +123,8 @@ def set_field_to_value(context, field_name, field_value): @step(u'Save the contact') def save_contact(context): context.app.contact_editor.button('Save').click() + assert wait_until(lambda x: not x.showing, context.app.contact_editor),\ + "Contact Editor was not hidden" assert wait_until(lambda x: x.dead, context.app.contact_editor),\ "Contact Editor was not closed" context.app.contact_editor = None -- cgit v1.2.3