Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 1097035 - Write a test to verify that the user can forward a sent me... #26221

Merged
merged 1 commit into from Nov 21, 2014

Conversation

viorelaioia-zz
Copy link

...ssage

@try-server-hook
Copy link

viorelaioia viorelaioia started tests. Results

_text_message_content = "Automated Test %s" % str(time.time())

# Send a SMS to the device
self.data_layer.send_sms(self.testvars['local_phone_numbers'][0], _text_message_content)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this sent to the setUp(self) function because having an SMS on the device is a prerequisite.

    def setUp(self):
        GaiaTestCase.setUp(self)
        self._text_message_content = "Automated Test %s" % str(time.time())
        # Send a SMS to the device
        self.data_layer.send_sms(self.testvars['local_phone_numbers'][0], self._text_message_content)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, shoud we send this SMS to the device under test? We only need to have a sent message in the inbox.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@viorelaioia-zz viorelaioia-zz force-pushed the bug_1097035 branch 2 times, most recently from 250b033 to 30f767a Compare November 19, 2014 11:51
@try-server-hook
Copy link

viorelaioia viorelaioia started tests. Results

@viorelaioia-zz
Copy link
Author

@try-server-hook
Copy link

viorelaioia viorelaioia started tests. Results

# Launch the app
messages = Messages(self.marionette)
messages.launch()
message_thread = messages.tap_first_received_message()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will open a new bug to rename tap_first_received_message() method, as we are tapping the first message displayed, which can be both received or sent message.

@try-server-hook
Copy link

viorelaioia viorelaioia started tests. Results

self.assertEqual(new_message.recipients[0].text, u'')

# Check that the message field has the content we expect
self.assertEqual(message_thread.sent_messages[1].text, self._text_message_content)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should assert against the new_message not the old message thread.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooops, I know how I missed that. Updated now :)

@try-server-hook
Copy link

viorelaioia viorelaioia started tests. Results

@viorelaioia-zz
Copy link
Author

@chirarobert
Copy link
Contributor

lgtm

chirarobert added a commit that referenced this pull request Nov 21, 2014
Bug 1097035 - Write a test to verify that the user can forward a sent me...
@chirarobert chirarobert merged commit b3af404 into mozilla-b2g:master Nov 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants