Merge lp:~thumper/launchpad/use-last-rev-id into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Approved by: Tim Penhey
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~thumper/launchpad/use-last-rev-id
Merge into: lp:launchpad
Diff against target: 411 lines (+138/-43)
8 files modified
lib/canonical/launchpad/javascript/code/branchmergeproposal.js (+81/-8)
lib/lp/code/browser/branchmergeproposal.py (+1/-0)
lib/lp/code/doc/branch-merge-proposals.txt (+4/-5)
lib/lp/code/interfaces/branchmergeproposal.py (+5/-5)
lib/lp/code/model/branchmergeproposal.py (+5/-2)
lib/lp/code/stories/webservice/xx-branchmergeproposal.txt (+7/-7)
lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt (+27/-13)
lib/lp/code/windmill/tests/test_branchmergeproposal_commitmessage.py (+8/-3)
To merge this branch: bzr merge lp:~thumper/launchpad/use-last-rev-id
Reviewer Review Type Date Requested Status
Michael Nelson (community) ui Approve
Paul Hummer (community) code js ui* Approve
Review via email: mp+20023@code.launchpad.net

Commit message

Send through the last scanned id when approving a merge proposal and update the table asynchronously.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Need to find a good way to test this.

Revision history for this message
Tim Penhey (thumper) wrote :

Changed the windmill test to use the approved value and check for the approved revision id.

Revision history for this message
Paul Hummer (rockstar) wrote :

Think adding a few comments to the insertion code would be helpful. When I look at the patch, I know what the javascript is doing because I see the tal changes as well. Seeing the javascript by itself might be a little confusing (it is a bit hairy, but clever).

review: Approve (code js ui*)
Revision history for this message
Tim Penhey (thumper) wrote :

http://people.canonical.com/~tim/magic.ogv contains a movie showing the changes.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

> Need to find a good way to test this.

Heh, a script to setup the environment that you demo'd would be great. I just created an MP for ~name12/gnome-terminal/scanned but that of course didn't have a last revision, but I could play a little with it.

UI-wise, it works really well, updating the display with the extra row when necessary. I laughed in your video near the end where you go to update the version number, but then hesitate and stop the video... made me click it ;). So I assume that'll get done later... do you think it's worth doing it before landing this branch? The non-js fallback works fine, but it does seem strange that it doesn't bring up an overlay and update inline. Up to you.

Now, nothing to do with a UI review, but I wrote a DynamicDomUpdater a while back for this *type* of thing - basically it allows you to plug-in the functionality so that a node (for example, a table node) knows how to update itself. YMMV, but you can find it at:

lib/canonical/launchpad/javascript/soyuz/lp_dynamic_dom_updater.js

tested at:

lib/canonical/launchpad/javascript/soyuz/tests/lp_dynamic_dom_updater.js

Cheers,
Michael.

review: Approve (ui)
Revision history for this message
Tim Penhey (thumper) wrote :

Setting the merged revision id has always behaved like that. I hesitated because it wasn't want I was wanting to demonstrate :) I'll take a look at the dynamic dom updater at some stage.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/javascript/code/branchmergeproposal.js'
--- lib/canonical/launchpad/javascript/code/branchmergeproposal.js 2009-11-23 19:29:02 +0000
+++ lib/canonical/launchpad/javascript/code/branchmergeproposal.js 2010-02-26 00:40:38 +0000
@@ -32,19 +32,24 @@
32 success: function(entry) {32 success: function(entry) {
33 var cb = status_choice_edit.get('contentBox');33 var cb = status_choice_edit.get('contentBox');
34 Y.Array.each(conf.status_widget_items, function(item) {34 Y.Array.each(conf.status_widget_items, function(item) {
35 if (item.value == status_choice_edit.get(35 if (item.value == status_choice_edit.get('value')) {
36 'value')) {36 cb.query('span').addClass(item.css_class);
37 cb.query('span').addClass(item.css_class);37 } else {
38 } else {38 cb.query('span').removeClass(item.css_class);
39 cb.query('span').removeClass(item.css_class);39 }
40 }40 });
41 });41 update_summary();
42 },
43 end: function() {
44 status_content.one('img').set('src', '/@@/edit');
42 }45 }
43 },46 },
44 parameters: {47 parameters: {
45 status: status_choice_edit.get('value')48 status: status_choice_edit.get('value'),
49 revid: conf.source_revid
46 }50 }
47 };51 };
52 status_content.one('img').set('src', '/@@/spinner');
48 lp_client = new LP.client.Launchpad();53 lp_client = new LP.client.Launchpad();
49 lp_client.named_post(54 lp_client.named_post(
50 LP.client.cache.context.self_link, 'setStatus', config);55 LP.client.cache.context.self_link, 'setStatus', config);
@@ -54,4 +59,72 @@
54 }59 }
55};60};
5661
62/*
63 * Update the summary table for the merge proposal.
64 *
65 * An async request is made for the summary table, and the content is
66 * inspected. We don't modify the status row as it is in the process of having
67 * animations run on it. Each of the table rows has an id that is strictly
68 * alphabetical. This ordering is used to determine if a row needs to be
69 * added or removed to the table shown on the current page. If the row
70 * appears in both, the content is checked (except for diffs as that'll never
71 * be the same due to the javascript added classes) and if it differs the
72 * shown rows are updated.
73 */
74function update_summary() {
75 var existing_summary = Y.one('#proposal-summary tbody');
76 SUMMARY_SNIPPET = '+pagelet-summary';
77 Y.io(SUMMARY_SNIPPET, {
78 on: {
79 success: function(id, response) {
80 var new_summary = Y.Node.create(response.responseText);
81 var new_rows = new_summary.all('tr');
82 var old_rows = existing_summary.all('tr');
83 // Skip over the status row (row 0).
84 var new_pos = 1;
85 var old_pos = 1;
86 var new_size = new_rows.size();
87 var old_size = old_rows.size();
88
89 while (new_pos < new_size && old_pos < old_size) {
90 var new_row = new_rows.item(new_pos);
91 var old_row = old_rows.item(old_pos);
92 var new_id = new_row.get('id');
93 var old_id = old_row.get('id');
94 if (new_id == old_id) {
95 if (new_id != 'summary-row-b-diff') {
96 // Don't mess with the diff.
97 if (new_row.get('innerHTML') !=
98 old_row.get('innerHTML')) {
99 existing_summary.insertBefore(new_row, old_row);
100 old_row.remove();
101 }
102 }
103 ++new_pos;
104 ++old_pos;
105 } else if (new_id < old_id) {
106 ++new_pos;
107 existing_summary.insertBefore(new_row, old_row);
108 } else {
109 ++old_pos;
110 old_row.remove();
111 }
112 }
113 // Remove all left over old rows, and add all left over new rows.
114 while (old_pos < old_size) {
115 var old_row = old_rows.item(old_pos);
116 ++old_pos;
117 old_row.remove();
118 }
119 while (new_pos < new_size) {
120 var new_row = new_rows.item(new_pos);
121 ++new_pos;
122 if (new_row.get('id') != 'summary-row-b-diff') {
123 existing_summary.append(new_row);
124 }
125 }
126 }
127 }});
128}
129
57}, "0.1", {"requires": ["io", "node", "lazr.choiceedit", "lp.client.plugins"]});130}, "0.1", {"requires": ["io", "node", "lazr.choiceedit", "lp.client.plugins"]});
58131
=== modified file 'lib/lp/code/browser/branchmergeproposal.py'
--- lib/lp/code/browser/branchmergeproposal.py 2010-02-05 21:59:26 +0000
+++ lib/lp/code/browser/branchmergeproposal.py 2010-02-26 00:40:39 +0000
@@ -687,6 +687,7 @@
687 self._createStatusVocabulary(),687 self._createStatusVocabulary(),
688 css_class_prefix='mergestatus'),688 css_class_prefix='mergestatus'),
689 'status_value': self.context.queue_status.title,689 'status_value': self.context.queue_status.title,
690 'source_revid': self.context.source_branch.last_scanned_id,
690 'user_can_edit_status': check_permission(691 'user_can_edit_status': check_permission(
691 'launchpad.Edit', self.context),692 'launchpad.Edit', self.context),
692 })693 })
693694
=== modified file 'lib/lp/code/doc/branch-merge-proposals.txt'
--- lib/lp/code/doc/branch-merge-proposals.txt 2009-10-01 17:41:10 +0000
+++ lib/lp/code/doc/branch-merge-proposals.txt 2010-02-26 00:40:38 +0000
@@ -257,12 +257,11 @@
257 >>> print proposal.queue_status.title257 >>> print proposal.queue_status.title
258 Needs review258 Needs review
259259
260Branches that had been approved that have subsequently been260Branches that had been approved that have subsequently been set back into the
261set back into the needs review state still retain their old reviewed261needs review state have their reviewed revision cleared.
262revision id.
263262
264 >>> proposal.reviewed_revision_id == tip.revision_id263 >>> print proposal.reviewed_revision_id
265 True264 None
266265
267If the target branch has specified a specific reviewer, then either the owner266If the target branch has specified a specific reviewer, then either the owner
268of the target branch or the reviewer is able to approve or reject the267of the target branch or the reviewer is able to approve or reject the
269268
=== modified file 'lib/lp/code/interfaces/branchmergeproposal.py'
--- lib/lp/code/interfaces/branchmergeproposal.py 2010-01-11 20:07:17 +0000
+++ lib/lp/code/interfaces/branchmergeproposal.py 2010-02-26 00:40:38 +0000
@@ -133,7 +133,7 @@
133 Text(133 Text(
134 title=_(134 title=_(
135 "The revision id that has been approved by the reviewer.")),135 "The revision id that has been approved by the reviewer.")),
136 exported_as='reviewed_revno')136 exported_as='reviewed_revid')
137137
138 commit_message = exported(138 commit_message = exported(
139 Summary(139 Summary(
@@ -159,7 +159,7 @@
159 required=False,159 required=False,
160 description=_("The revision id that has been queued for "160 description=_("The revision id that has been queued for "
161 "landing.")),161 "landing.")),
162 exported_as='queued_revno')162 exported_as='queued_revid')
163163
164 merged_revno = exported(164 merged_revno = exported(
165 Int(165 Int(
@@ -269,7 +269,7 @@
269 """True if it is valid for user update the proposal to next_state."""269 """True if it is valid for user update the proposal to next_state."""
270270
271 @call_with(user=REQUEST_USER)271 @call_with(user=REQUEST_USER)
272 @rename_parameters_as(revision_id='revno')272 @rename_parameters_as(revision_id='revid')
273 @operation_parameters(273 @operation_parameters(
274 status=Choice(274 status=Choice(
275 title=_("The new status of the merge proposal."),275 title=_("The new status of the merge proposal."),
@@ -284,8 +284,8 @@
284284
285 :param status: The new status of the merge proposal.285 :param status: The new status of the merge proposal.
286 :param user: The user making the change.286 :param user: The user making the change.
287 :param revision_id: The revno to provide to the underlying status287 :param revision_id: The revision id to provide to the underlying
288 change method.288 status change method.
289 """289 """
290290
291 def setAsWorkInProgress():291 def setAsWorkInProgress():
292292
=== modified file 'lib/lp/code/model/branchmergeproposal.py'
--- lib/lp/code/model/branchmergeproposal.py 2009-12-18 20:14:21 +0000
+++ lib/lp/code/model/branchmergeproposal.py 2010-02-26 00:40:39 +0000
@@ -340,8 +340,6 @@
340 self.setAsWorkInProgress()340 self.setAsWorkInProgress()
341 elif status == BranchMergeProposalStatus.NEEDS_REVIEW:341 elif status == BranchMergeProposalStatus.NEEDS_REVIEW:
342 self.requestReview()342 self.requestReview()
343 elif status == BranchMergeProposalStatus.NEEDS_REVIEW:
344 self.requestReview()
345 elif status == BranchMergeProposalStatus.CODE_APPROVED:343 elif status == BranchMergeProposalStatus.CODE_APPROVED:
346 # Other half of the edge case. If the status is currently queued,344 # Other half of the edge case. If the status is currently queued,
347 # we need to dequeue, otherwise we just approve the branch.345 # we need to dequeue, otherwise we just approve the branch.
@@ -378,6 +376,11 @@
378 if self.queue_status != BranchMergeProposalStatus.NEEDS_REVIEW:376 if self.queue_status != BranchMergeProposalStatus.NEEDS_REVIEW:
379 self._transitionToState(BranchMergeProposalStatus.NEEDS_REVIEW)377 self._transitionToState(BranchMergeProposalStatus.NEEDS_REVIEW)
380 self.date_review_requested = _date_requested378 self.date_review_requested = _date_requested
379 # Clear out any reviewed or queued values.
380 self.reviewer = None
381 self.reviewed_revision_id = None
382 self.queuer = None
383 self.queued_revision_id = None
381384
382 def isMergable(self):385 def isMergable(self):
383 """See `IBranchMergeProposal`."""386 """See `IBranchMergeProposal`."""
384387
=== modified file 'lib/lp/code/stories/webservice/xx-branchmergeproposal.txt'
--- lib/lp/code/stories/webservice/xx-branchmergeproposal.txt 2010-02-04 16:52:05 +0000
+++ lib/lp/code/stories/webservice/xx-branchmergeproposal.txt 2010-02-26 00:40:39 +0000
@@ -42,12 +42,12 @@
42 private: False42 private: False
43 queue_position: None43 queue_position: None
44 queue_status: u'Needs review'44 queue_status: u'Needs review'
45 queued_revno: None45 queued_revid: None
46 queuer_link: None46 queuer_link: None
47 registrant_link: u'http://api.launchpad.dev/beta/~person-name...'47 registrant_link: u'http://api.launchpad.dev/beta/~person-name...'
48 resource_type_link:48 resource_type_link:
49 u'http://api.launchpad.dev/beta/#branch_merge_proposal'49 u'http://api.launchpad.dev/beta/#branch_merge_proposal'
50 reviewed_revno: None50 reviewed_revid: None
51 reviewer_link: None51 reviewer_link: None
52 self_link: u'http://api.launchpad.dev/beta/~.../+merge/...'52 self_link: u'http://api.launchpad.dev/beta/~.../+merge/...'
53 source_branch_link: u'http://api.launchpad.dev/beta/~...'53 source_branch_link: u'http://api.launchpad.dev/beta/~...'
@@ -136,11 +136,11 @@
136 private: False136 private: False
137 queue_position: None137 queue_position: None
138 queue_status: u'Work in progress'138 queue_status: u'Work in progress'
139 queued_revno: None139 queued_revid: None
140 queuer_link: None140 queuer_link: None
141 registrant_link: u'http://.../~person-name...'141 registrant_link: u'http://.../~person-name...'
142 resource_type_link: u'http://.../#branch_merge_proposal'142 resource_type_link: u'http://.../#branch_merge_proposal'
143 reviewed_revno: None143 reviewed_revid: None
144 reviewer_link: None144 reviewer_link: None
145 self_link: u'http://.../~source/fooix/fix-it/+merge/...'145 self_link: u'http://.../~source/fooix/fix-it/+merge/...'
146 source_branch_link: u'http://.../~source/fooix/fix-it'146 source_branch_link: u'http://.../~source/fooix/fix-it'
@@ -259,13 +259,13 @@
259259
260 >>> _unused = reviewer_webservice.named_post(260 >>> _unused = reviewer_webservice.named_post(
261 ... merge_proposal['self_link'], 'setStatus',261 ... merge_proposal['self_link'], 'setStatus',
262 ... status=u'Approved', revno=u'25')262 ... status=u'Approved', revid=u'25')
263 >>> merge_proposal = reviewer_webservice.get(263 >>> merge_proposal = reviewer_webservice.get(
264 ... merge_proposal['self_link']).jsonBody()264 ... merge_proposal['self_link']).jsonBody()
265265
266 >>> print merge_proposal['queue_status']266 >>> print merge_proposal['queue_status']
267 Approved267 Approved
268 >>> print merge_proposal['reviewed_revno']268 >>> print merge_proposal['reviewed_revid']
269 25269 25
270270
271However, there may have been breakage in the branch, and we need to revert back271However, there may have been breakage in the branch, and we need to revert back
@@ -279,7 +279,7 @@
279279
280 >>> print merge_proposal['queue_status']280 >>> print merge_proposal['queue_status']
281 Work in progress281 Work in progress
282 >>> print merge_proposal['reviewed_revno']282 >>> print merge_proposal['reviewed_revid']
283 None283 None
284284
285285
286286
=== modified file 'lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt'
--- lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt 2010-02-02 17:19:05 +0000
+++ lib/lp/code/templates/branchmergeproposal-pagelet-summary.pt 2010-02-26 00:40:39 +0000
@@ -6,7 +6,15 @@
6 tal:define="context_menu context/menu:context">6 tal:define="context_menu context/menu:context">
77
8 <tbody>8 <tbody>
9 <tr>9 <tal:comment condition="nothing">
10 <!--
11 Each of the rows in this table have an id that is strictly
12 alphabetical (according to ASCII). This is used in the javascript
13 processing of the summary to determine which rows have been added,
14 and removed through AJAX requests.
15 -->
16 </tal:comment>
17 <tr id="summary-row-1-status">
10 <th>Status:</th>18 <th>Status:</th>
11 <td id="branchmergeproposal-status-value">19 <td id="branchmergeproposal-status-value">
12 <span tal:attributes="class string:value mergestatus${context/queue_status/name}"20 <span tal:attributes="class string:value mergestatus${context/queue_status/name}"
@@ -21,12 +29,14 @@
21 </td>29 </td>
22 </tr>30 </tr>
23 <tal:comment condition="nothing">31 <tal:comment condition="nothing">
24 Only show the reviewed section if the state is not superseded.32 <!--
25 Only show the reviewed revision if not rejected.33 Only show the reviewed section if the state is not superseded.
34 Only show the reviewed revision if not rejected.
35 -->
26 </tal:comment>36 </tal:comment>
27 <tal:not-superseded condition="not: context/queue_status/enumvalue:SUPERSEDED">37 <tal:not-superseded condition="not: context/queue_status/enumvalue:SUPERSEDED">
28 <tal:reviewed condition="context/reviewer">38 <tal:reviewed condition="context/reviewer">
29 <tr>39 <tr id="summary-row-2-reviewer">
30 <th>40 <th>
31 <tal:rejected condition="context/queue_status/enumvalue:REJECTED">41 <tal:rejected condition="context/queue_status/enumvalue:REJECTED">
32 Rejected by:42 Rejected by:
@@ -42,7 +52,8 @@
42 <tal:modified replace="context/date_reviewed/fmt:displaydate" />52 <tal:modified replace="context/date_reviewed/fmt:displaydate" />
43 </td>53 </td>
44 </tr>54 </tr>
45 <tr tal:condition="not: context/queue_status/enumvalue:REJECTED">55 <tr id="summary-row-3-approved-revision"
56 tal:condition="not: context/queue_status/enumvalue:REJECTED">
46 <th>Approved revision:</th>57 <th>Approved revision:</th>
47 <td>58 <td>
48 <tal:not-available condition="not: context/reviewed_revision_id">59 <tal:not-available condition="not: context/reviewed_revision_id">
@@ -57,11 +68,11 @@
57 </tal:reviewed>68 </tal:reviewed>
58 </tal:not-superseded>69 </tal:not-superseded>
59 <tal:queued condition="context/queue_status/enumvalue:QUEUED">70 <tal:queued condition="context/queue_status/enumvalue:QUEUED">
60 <tr>71 <tr id="summary-row-4-queued-by">
61 <th>Queued by:</th>72 <th>Queued by:</th>
62 <td tal:content="structure context/queuer/fmt:link">Some User</td>73 <td tal:content="structure context/queuer/fmt:link">Some User</td>
63 </tr>74 </tr>
64 <tr>75 <tr id="summary-row-5-queued-revision">
65 <th>Queued revision:</th>76 <th>Queued revision:</th>
66 <td>77 <td>
67 <tal:not-available condition="not: context/queued_revision_id">78 <tal:not-available condition="not: context/queued_revision_id">
@@ -75,11 +86,12 @@
75 </tr>86 </tr>
76 </tal:queued>87 </tal:queued>
77 <tal:merged condition="context/queue_status/enumvalue:MERGED">88 <tal:merged condition="context/queue_status/enumvalue:MERGED">
78 <tr tal:condition="context/merge_reporter">89 <tr id="summary-row-6-merge-reporter"
90 tal:condition="context/merge_reporter">
79 <th>Merge reported by:</th>91 <th>Merge reported by:</th>
80 <td tal:content="structure context/merge_reporter/fmt:link">Some User</td>92 <td tal:content="structure context/merge_reporter/fmt:link">Some User</td>
81 </tr>93 </tr>
82 <tr>94 <tr id="summary-row-7-merged-revision">
83 <th>Merged at revision:</th>95 <th>Merged at revision:</th>
84 <td>96 <td>
85 <tal:not-available condition="not: context/merged_revno">97 <tal:not-available condition="not: context/merged_revno">
@@ -97,19 +109,21 @@
97 </td>109 </td>
98 </tr>110 </tr>
99 </tal:merged>111 </tal:merged>
100 <tr>112 <tr id="summary-row-8-source-branch">
101 <th>Proposed branch:</th>113 <th>Proposed branch:</th>
102 <td tal:content="structure context/source_branch/fmt:bzr-link">lp:~foo/bar/baz</td>114 <td tal:content="structure context/source_branch/fmt:bzr-link">lp:~foo/bar/baz</td>
103 </tr>115 </tr>
104 <tr>116 <tr id="summary-row-9-target-branch">
105 <th>Merge into:</th>117 <th>Merge into:</th>
106 <td tal:content="structure context/target_branch/fmt:bzr-link">lp:~foo/bar/baz</td>118 <td tal:content="structure context/target_branch/fmt:bzr-link">lp:~foo/bar/baz</td>
107 </tr>119 </tr>
108 <tr tal:condition="context/prerequisite_branch">120 <tr id="summary-row-a-prerequisite-branch"
121 tal:condition="context/prerequisite_branch">
109 <th>Prerequisite:</th>122 <th>Prerequisite:</th>
110 <td tal:content="structure context/prerequisite_branch/fmt:bzr-link">lp:~foo/bar/baz</td>123 <td tal:content="structure context/prerequisite_branch/fmt:bzr-link">lp:~foo/bar/baz</td>
111 </tr>124 </tr>
112 <tr tal:condition="context/preview_diff">125 <tr id="summary-row-b-diff"
126 tal:condition="context/preview_diff">
113 <th>Diff against target:</th>127 <th>Diff against target:</th>
114 <td>128 <td>
115 <tal:diff replace="structure context/preview_diff/fmt:link"/>129 <tal:diff replace="structure context/preview_diff/fmt:link"/>
116130
=== modified file 'lib/lp/code/windmill/tests/test_branchmergeproposal_commitmessage.py'
--- lib/lp/code/windmill/tests/test_branchmergeproposal_commitmessage.py 2010-02-01 18:37:00 +0000
+++ lib/lp/code/windmill/tests/test_branchmergeproposal_commitmessage.py 2010-02-26 00:40:38 +0000
@@ -81,6 +81,7 @@
81 email="mike@example.com")81 email="mike@example.com")
82 branch = self.factory.makeBranch(owner=mike)82 branch = self.factory.makeBranch(owner=mike)
83 second_branch = self.factory.makeBranch(product=branch.product)83 second_branch = self.factory.makeBranch(product=branch.product)
84 self.factory.makeRevisionsForBranch(second_branch)
84 merge_proposal = second_branch.addLandingTarget(mike, branch)85 merge_proposal = second_branch.addLandingTarget(mike, branch)
85 transaction.commit()86 transaction.commit()
8687
@@ -99,12 +100,16 @@
99 xpath=u'//div[contains(@class, "yui-ichoicelist-content")]')100 xpath=u'//div[contains(@class, "yui-ichoicelist-content")]')
100101
101 # Change the status to experimental.102 # Change the status to experimental.
102 client.click(link=u'Rejected')103 client.click(link=u'Approved')
103 client.waits.sleep(milliseconds=SLEEP)104 client.waits.sleep(milliseconds=SLEEP)
104105
105 client.asserts.assertText(106 client.asserts.assertText(
106 xpath=u'//td[@id="branchmergeproposal-status-value"]/span',107 xpath=u'//td[@id="branchmergeproposal-status-value"]/span',
107 validator=u'Rejected')108 validator=u'Approved')
109
110 client.asserts.assertText(
111 xpath=u'//tr[@id="summary-row-3-approved-revision"]/td',
112 validator=u'5')
108113
109 # Reload the page and make sure the change sticks.114 # Reload the page and make sure the change sticks.
110 client.open(url=merge_url)115 client.open(url=merge_url)
@@ -114,7 +119,7 @@
114 timeout=FOR_ELEMENT)119 timeout=FOR_ELEMENT)
115 client.asserts.assertText(120 client.asserts.assertText(
116 xpath=u'//td[@id="branchmergeproposal-status-value"]/span',121 xpath=u'//td[@id="branchmergeproposal-status-value"]/span',
117 validator=u'Rejected')122 validator=u'Approved')
118123
119124
120def test_suite():125def test_suite():