Handle dashboard edge case
If a user has no outgoing changes, but is not eligible to view the
create change help panel, the "Outgoing reviews" section appears blank.
This change adds back in the "No changes" placeholder text.
Change-Id: I55915ef9999e5356dc13824352d087419f7ce5f4
(cherry picked from commit 9a5d102115
)
This commit is contained in:

committed by
Paladox none

parent
1eead16a66
commit
67f158c734
@@ -101,6 +101,9 @@ limitations under the License.
|
||||
<template is="dom-if" if="[[_showNewUserHelp]]">
|
||||
<gr-create-change-help on-create-tap="createChangeTap"></gr-create-change-help>
|
||||
</template>
|
||||
<template is="dom-if" if="[[!_showNewUserHelp]]">
|
||||
No changes
|
||||
</template>
|
||||
</div>
|
||||
</gr-change-list>
|
||||
</div>
|
||||
|
@@ -299,6 +299,20 @@ limitations under the License.
|
||||
});
|
||||
});
|
||||
|
||||
test('_showNewUserHelp', () => {
|
||||
element._loading = false;
|
||||
element._showNewUserHelp = false;
|
||||
flushAsynchronousOperations();
|
||||
|
||||
assert.equal(element.$.emptyOutgoing.textContent.trim(), 'No changes');
|
||||
assert.isNotOk(element.$$('gr-create-change-help'));
|
||||
element._showNewUserHelp = true;
|
||||
flushAsynchronousOperations();
|
||||
|
||||
assert.notEqual(element.$.emptyOutgoing.textContent.trim(), 'No changes');
|
||||
assert.isOk(element.$$('gr-create-change-help'));
|
||||
});
|
||||
|
||||
test('_computeUserHeaderClass', () => {
|
||||
assert.equal(element._computeUserHeaderClass(undefined), '');
|
||||
assert.equal(element._computeUserHeaderClass(''), '');
|
||||
|
Reference in New Issue
Block a user