From 21526245682b7c3b8ec66751bceb8ce039aa4450 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 3 Oct 2014 16:56:04 -0300 Subject: No more archive dialog, updating functional tests #53 --- fake-service/features/forward_trash_archive.feature | 3 +-- fake-service/features/steps/common.py | 4 ++-- fake-service/features/steps/mail_view.py | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fake-service/features/forward_trash_archive.feature b/fake-service/features/forward_trash_archive.feature index fd7c6f6e..dbbf200b 100644 --- a/fake-service/features/forward_trash_archive.feature +++ b/fake-service/features/forward_trash_archive.feature @@ -15,7 +15,7 @@ # along with Pixelated. If not, see . Feature: forward_trash_archive - Scenario: User forwards a mail, add CC and BCC address, later trash and archive the mail + Scenario: User forwards a mail, add CC and BCC address, later trash the mail When I open the first mail in the 'inbox' Then I choose to forward this mail And for the 'CC' field I type 'ab' and chose the first contact that shows @@ -23,6 +23,5 @@ Feature: forward_trash_archive And I forward this mail When I open the first mail in the 'sent' Then I see the mail has a cc and a bcc recipient - And I remove all tags And I choose to trash Then I see that mail under the 'trash' tag diff --git a/fake-service/features/steps/common.py b/fake-service/features/steps/common.py index ae46b04a..8255a9de 100644 --- a/fake-service/features/steps/common.py +++ b/fake-service/features/steps/common.py @@ -70,8 +70,8 @@ def wait_until_button_is_visible(context, title): locator_tuple = (By.XPATH, ("//%s[contains(.,'%s')]" % ('button', title))) wait.until(EC.visibility_of_element_located(locator_tuple)) -def click_button(context, title): - button = find_element_containing_text(context, title, element_type='button') +def click_button(context, title, element='button'): + button = find_element_containing_text(context, title, element_type=element) button.click() def mail_subject(context): diff --git a/fake-service/features/steps/mail_view.py b/fake-service/features/steps/mail_view.py index 96208acc..089f9bd4 100644 --- a/fake-service/features/steps/mail_view.py +++ b/fake-service/features/steps/mail_view.py @@ -84,8 +84,8 @@ def impl(context): @then('I choose to trash') def impl(context): - wait_until_button_is_visible(context, 'Trash message') - click_button(context, 'Trash message') + context.browser.execute_script("$('button#view-more-actions').click()") + click_button(context, 'Trash this message', 'span') @then('I see the mail has a cc and a bcc recipient') def impl(context): -- cgit v1.2.3