~osomon/notes-app/fix-ap-tests-parts

« back to all changes in this revision

Viewing changes to tests/autopilot/notes_app/tests/test_create.py

Fake merge request to try having jenkins run tests many times.

Approved by Olivier Tilloy, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        note = notes[index]
41
41
 
42
42
        self.pointing_device.click_object(note)
43
 
        self.assertThat(note.isExpanded, Eventually(Equals(True)))
 
43
        self.assert_note_eventually_expanded(note)
44
44
        self.pointing_device.click()
45
45
 
46
46
        return note
51
51
 
52
52
        self.keyboard.type("Hello", delay=self.TYPING_DELAY)
53
53
        self.pointing_device.click_object(header)
54
 
        self.assertThat(note.isExpanded, Eventually(Equals(False)))
 
54
        self.assert_note_eventually_collapsed(note)
55
55
 
56
56
    def test_note_expand_and_unexpand(self):
57
57
        header = self.main_window.get_header()
63
63
 
64
64
        # Clicking on a note should expand it
65
65
        self.pointing_device.click_object(note)
66
 
        self.assertThat(note.isExpanded, Eventually(Equals(True)))
 
66
        self.assert_note_eventually_expanded(note)
67
67
 
68
68
        # Clicking outside of the note should unexpand it, and this should
69
69
        # cause it to be deleted
80
80
 
81
81
        # Clicking on a note should expand it but it should not be focused
82
82
        self.pointing_device.click_object(note)
83
 
        self.assertThat(note.isExpanded, Eventually(Equals(True)))
 
83
        self.assert_note_eventually_expanded(note)
84
84
 
85
85
        content = self.main_window.get_note_content(note)
86
86
        self.assertThat(content.activeFocus, Equals(False))
106
106
 
107
107
        # Clicking on a note should expand it but it should not be focused
108
108
        self.pointing_device.click_object(note)
109
 
        self.assertThat(note.isExpanded, Eventually(Equals(True)))
 
109
        self.assert_note_eventually_expanded(note)
110
110
 
111
111
        content = self.main_window.get_note_content(note)
112
112
        self.assertThat(content.activeFocus, Equals(False))
128
128
        # Type something so that the note doesn't get deleted then collapse it.
129
129
        self.keyboard.type("Hello", delay=self.TYPING_DELAY)
130
130
        self.pointing_device.click_object(header)
131
 
        self.assertThat(note.isExpanded, Eventually(Equals(False)))
 
131
        self.assert_note_eventually_collapsed(note)
132
132
 
133
133
        content = self.main_window.get_note_content(note)
134
134
        self.assertThat(content.activeFocus, Equals(False))