diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2014-10-03 16:56:04 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2014-10-03 16:56:04 -0300 |
commit | 21526245682b7c3b8ec66751bceb8ce039aa4450 (patch) | |
tree | 75ee182a48255fe36c093a2eb48914b6f24dbae3 /fake-service/features | |
parent | d57e4993ece29da34c370a96732c820798c5048b (diff) |
No more archive dialog, updating functional tests #53
Diffstat (limited to 'fake-service/features')
-rw-r--r-- | fake-service/features/forward_trash_archive.feature | 3 | ||||
-rw-r--r-- | fake-service/features/steps/common.py | 4 | ||||
-rw-r--r-- | 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 <http://www.gnu.org/licenses/>. 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): |