Merge "Tighten specificity of label score regex"

This commit is contained in:
viktard
2018-02-13 04:30:35 +00:00
committed by Gerrit Code Review
2 changed files with 10 additions and 1 deletions

View File

@@ -16,7 +16,7 @@
const CI_LABELS = ['Trybot-Ready', 'Tryjob-Request', 'Commit-Queue'];
const PATCH_SET_PREFIX_PATTERN = /^Patch Set \d+: /;
const LABEL_TITLE_SCORE_PATTERN = /([A-Za-z0-9-]+)([+-]\d+)/;
const LABEL_TITLE_SCORE_PATTERN = /^([A-Za-z0-9-]+)([+-]\d+)$/;
Polymer({
is: 'gr-message',

View File

@@ -180,5 +180,14 @@ limitations under the License.
};
assert.isOk(Polymer.dom(element.root).querySelector('.positiveVote'));
});
test('false negative vote', () => {
element.message = {
author: {},
expanded: false,
message: 'Patch Set 1: Cherry Picked from branch stable-2.14.',
};
assert.isNotOk(Polymer.dom(element.root).querySelector('.negativeVote'));
});
});
</script>