Merge lp:~vthompson/ubuntu-filemanager-app/autopilot-test-copy-paste-bug-1188746 into lp:ubuntu-filemanager-app

Proposed by Victor Thompson
Status: Merged
Approved by: Michael Spencer
Approved revision: 51
Merged at revision: 52
Proposed branch: lp:~vthompson/ubuntu-filemanager-app/autopilot-test-copy-paste-bug-1188746
Merge into: lp:ubuntu-filemanager-app
Diff against target: 61 lines (+37/-2)
1 file modified
tests/autopilot/ubuntu_filemanager_app/tests/test_filemanager.py (+37/-2)
To merge this branch: bzr merge lp:~vthompson/ubuntu-filemanager-app/autopilot-test-copy-paste-bug-1188746
Reviewer Review Type Date Requested Status
Michael Spencer Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+177067@code.launchpad.net

Commit message

Add copy/past file autopilot test

Description of the change

Add copy/past file autopilot test

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Spencer (ibelieve) wrote :

Nice, glad to see that test get fixed!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntu_filemanager_app/tests/test_filemanager.py'
2--- tests/autopilot/ubuntu_filemanager_app/tests/test_filemanager.py 2013-07-16 01:06:44 +0000
3+++ tests/autopilot/ubuntu_filemanager_app/tests/test_filemanager.py 2013-07-25 23:28:26 +0000
4@@ -317,7 +317,7 @@
5 # Go back
6 self._go_up()
7
8- # Check that the file is still there
9+ # Check that the folder is still there
10 self.assertThat(self.main_window.get_file_count, Eventually(Equals(2)))
11 first_file = self.main_window.get_file_item(1)
12 self.assertThat(
13@@ -367,12 +367,47 @@
14 def test_copy_file(self):
15 pass
16 # Set up a file to copy and a folder to copy it into
17+ sub_dir = self._make_directory_in_home()
18+ fileName = self._make_file_in_home()
19+
20 # Copy the file
21+ first_file = self.main_window.get_file_item(1)
22+ self.assertThat(
23+ first_file.fileName,
24+ Eventually(Equals(os.path.split(fileName)[1])))
25+ self.tap_item(first_file)
26+
27+ popover = self.app.select_single(
28+ "ActionSelectionPopover", objectName='fileActionsPopover')
29+ self._run_action(popover, 'Copy')
30+
31 # Go to the destination folder
32+ first_folder = self.main_window.get_file_item(0)
33+ self.assertThat(
34+ first_folder.fileName,
35+ Eventually(Equals(os.path.split(sub_dir)[1])))
36+
37+ self.pointing_device.click_object(first_folder)
38+
39 # Paste it in
40+ self._run_folder_action('Paste 1 File')
41+
42 # Check that the file is there
43+ self.assertThat(self.main_window.get_file_count, Eventually(Equals(1)))
44+ first_file = self.main_window.get_file_item(0)
45+ self.assertThat(
46+ first_file.fileName,
47+ Eventually(Equals(os.path.split(fileName)[1])))
48+
49 # Go back
50- # Check that the folder is not there
51+ self._go_up()
52+
53+ # Check that the file is still there
54+ self.assertThat(self.main_window.get_file_count, Eventually(Equals(2)))
55+ first_file = self.main_window.get_file_item(1)
56+ self.assertThat(
57+ first_file.fileName,
58+ Eventually(Equals(os.path.split(fileName)[1])))
59
60 def test_cut_file(self):
61 # Set up a file to cut and a folder to copy it into

Subscribers

People subscribed via source and target branches