Change-Id: I4202b557844e8641bddcf821693c7109b3881bdf
This commit is contained in:
Becky Siegel
2017-05-22 09:59:39 -07:00
parent 9f09b2240f
commit c89e5e31cf
3 changed files with 12 additions and 12 deletions

View File

@@ -55,14 +55,14 @@ limitations under the License.
[{text: 'Anonymous', bold: true}, {text: ''}]); [{text: 'Anonymous', bold: true}, {text: ''}]);
}); });
test('test for account without a name but using config', () => { test('test for account without a name but using config', () => {
element._anonymousName = 'WikiGerrit'; element._anonymousName = 'WikiGerrit';
element.account = {id: '0001'}; element.account = {id: '0001'};
assert.deepEqual(element.topContent, assert.deepEqual(element.topContent,
[{text: 'WikiGerrit', bold: true}, {text: ''}]); [{text: 'WikiGerrit', bold: true}, {text: ''}]);
}); });
test('test for account name as an email', () => { test('test for account name as an email', () => {
element._anonymousName = 'WikiGerrit'; element._anonymousName = 'WikiGerrit';
element.account = {email: 'john@doe.com'}; element.account = {email: 'john@doe.com'};
assert.deepEqual(element.topContent, assert.deepEqual(element.topContent,

View File

@@ -197,7 +197,7 @@ limitations under the License.
}); });
test('getCurrentText', () => { test('getCurrentText', () => {
assert.equal(element.getCurrentText(), "test value 1"); assert.equal(element.getCurrentText(), 'test value 1');
}); });
}); });
</script> </script>

View File

@@ -82,15 +82,15 @@ limitations under the License.
test('emoji selector opens when a colon is typed & the textarea has focus', test('emoji selector opens when a colon is typed & the textarea has focus',
() => { () => {
MockInteractions.focus(element.$.textarea); MockInteractions.focus(element.$.textarea);
flushAsynchronousOperations(); flushAsynchronousOperations();
element.text = ':'; element.text = ':';
element.text = ':t'; element.text = ':t';
assert.isTrue(!element.$.emojiSuggestions.hidden); assert.isTrue(!element.$.emojiSuggestions.hidden);
assert.equal(element._colonIndex, 0); assert.equal(element._colonIndex, 0);
assert.isFalse(element._hideAutocomplete); assert.isFalse(element._hideAutocomplete);
assert.equal(element._currentSearchString, 't'); assert.equal(element._currentSearchString, 't');
}); });
test('emoji selector closes when text changes before the colon', () => { test('emoji selector closes when text changes before the colon', () => {
const resetStub = sandbox.stub(element, '_resetEmojiDropdown'); const resetStub = sandbox.stub(element, '_resetEmojiDropdown');