Merge "Make tests compatible with es6-modules"

This commit is contained in:
Dmitrii Filippov
2020-03-06 08:33:28 +00:00
committed by Gerrit Code Review
7 changed files with 8 additions and 10 deletions

View File

@@ -197,7 +197,7 @@ limitations under the License.
assert.equal(getComputedStyle(editBtn).display, 'none');
// The input, cancel, and save buttons are not visible.
for (item of hiddenElements) {
for (const item of hiddenElements) {
assert.notEqual(getComputedStyle(item).display, 'none');
}

View File

@@ -262,11 +262,11 @@ limitations under the License.
test('all selects are disabled when not in edit mode', () => {
const selects = Polymer.dom(element.root).querySelectorAll('select');
for (select of selects) {
for (const select of selects) {
assert.isTrue(select.disabled);
}
element.editing = true;
for (select of selects) {
for (const select of selects) {
assert.isFalse(select.disabled);
}
});

View File

@@ -42,7 +42,7 @@ limitations under the License.
on-reload-drafts="_reloadDraftsWithCallback"></gr-file-list>
<gr-comment-api id="commentAPI"></gr-comment-api>
</template>
<script src="../../diff/gr-comment-api/gr-comment-api-mock.js"></script>
<script src="../../diff/gr-comment-api/gr-comment-api-mock_test.js"></script>
</dom-module>
<test-fixture id="basic">

View File

@@ -38,7 +38,7 @@ limitations under the License.
change-comments="[[_changeComments]]"></gr-messages-list>
<gr-comment-api id="commentAPI"></gr-comment-api>
</template>
<script src="../../diff/gr-comment-api/gr-comment-api-mock.js"></script>
<script src="../../diff/gr-comment-api/gr-comment-api-mock_test.js"></script>
</dom-module>
<test-fixture id="basic">

View File

@@ -41,7 +41,7 @@ limitations under the License.
change-comments="[[_changeComments]]"></gr-patch-range-select>
<gr-comment-api id="commentAPI"></gr-comment-api>
</template>
<script src="../../diff/gr-comment-api/gr-comment-api-mock.js"></script>
<script src="../../diff/gr-comment-api/gr-comment-api-mock_test.js"></script>
</dom-module>
<test-fixture id="basic">

View File

@@ -37,8 +37,7 @@ limitations under the License.
});
</script>
<script>
/* eslint-disable no-unused-vars */
const mockPromise = () => {
self.mockPromise = () => {
let res;
const promise = new Promise(resolve => {
res = resolve;
@@ -46,8 +45,7 @@ limitations under the License.
promise.resolve = res;
return promise;
};
const isHidden = el => getComputedStyle(el).display === 'none';
/* eslint-enable no-unused-vars */
self.isHidden = el => getComputedStyle(el).display === 'none';
</script>
<script>
(function() {