summaryrefslogtreecommitdiff
path: root/service/test/functional/features/steps
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 14:55:15 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 17:00:34 +0200
commit224a4a7cd94d3a1eb825908e33feb10e72ad1a31 (patch)
tree8ae28b96107bbc2937f73a35bca5b8e188f83fb6 /service/test/functional/features/steps
parent242479ace03928b20dc86806f7592ec1148b615b (diff)
Check for subject instead of mail id for deleted mails.
Diffstat (limited to 'service/test/functional/features/steps')
-rw-r--r--service/test/functional/features/steps/common.py4
-rw-r--r--service/test/functional/features/steps/data_setup.py7
-rw-r--r--service/test/functional/features/steps/mail_list.py2
3 files changed, 11 insertions, 2 deletions
diff --git a/service/test/functional/features/steps/common.py b/service/test/functional/features/steps/common.py
index 93f4cb1f..9617f61d 100644
--- a/service/test/functional/features/steps/common.py
+++ b/service/test/functional/features/steps/common.py
@@ -120,6 +120,10 @@ def click_button(context, title, element='button'):
button.click()
+def mail_list_with_subject_exists(context, subject):
+ return find_element_by_xpath(context, "//*[@class='subject-and-tags' and contains(.,'%s')]" % subject)
+
+
def mail_subject(context):
e = find_element_by_css_selector(context, '#mail-view .subject')
return e.text
diff --git a/service/test/functional/features/steps/data_setup.py b/service/test/functional/features/steps/data_setup.py
index 2a3876fc..8648732e 100644
--- a/service/test/functional/features/steps/data_setup.py
+++ b/service/test/functional/features/steps/data_setup.py
@@ -13,11 +13,16 @@
#
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
+from uuid import uuid4
from test.support.integration import MailBuilder
from behave import given
@given('I have a mail in my inbox')
def add_mail_impl(context):
- input_mail = MailBuilder().build_input_mail()
+ subject = 'Hi! This the subject %s' % uuid4()
+
+ input_mail = MailBuilder().with_subject(subject).build_input_mail()
context.client.add_mail_to_inbox(input_mail)
+
+ context.last_subject = subject
diff --git a/service/test/functional/features/steps/mail_list.py b/service/test/functional/features/steps/mail_list.py
index 1875cb58..2b1092c5 100644
--- a/service/test/functional/features/steps/mail_list.py
+++ b/service/test/functional/features/steps/mail_list.py
@@ -72,7 +72,7 @@ def impl(context):
@then('the deleted mail is there')
def impl(context):
- find_current_mail(context)
+ mail_list_with_subject_exists(context, context.last_subject)
@given('I have mails')