Skip to content

Commit 710ecea

Browse files
committed
test: try to workaround edge timeouts
1 parent 883c6cb commit 710ecea

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/vaadin-dialog_draggable-resizable-test.html

+10-6
Original file line numberDiff line numberDiff line change
@@ -764,18 +764,20 @@
764764
const ios = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
765765
const isIOS10 = ios && String(ios).indexOf('OS 10') > -1;
766766
if (!isIOS10) {
767-
it('should not overflow when using vaadin-textarea in the content', async() => {
767+
it('should not overflow when using vaadin-textarea in the content', (done) => {
768768
const textarea = document.createElement('vaadin-text-area');
769769
textarea.value = Array(20).join('Lorem ipsum dolor sit amet');
770770
overlay.content.appendChild(textarea);
771771
window.ShadyDOM && window.ShadyDOM.flush();
772772
overlay.$.content.style.padding = '20px';
773773
resize(overlayPart.querySelector('.s'), 0, -50);
774-
await contentStabilized(dialog);
775-
expect(getComputedStyle(overlayPart).height).to.equal(getComputedStyle(container).height);
774+
window.requestAnimationFrame(() => {
775+
expect(getComputedStyle(overlayPart).height).to.equal(getComputedStyle(container).height);
776+
done();
777+
});
776778
});
777779

778-
it('should not reset scroll position on resize', async() => {
780+
it('should not reset scroll position on resize', (done) => {
779781
const div = document.createElement('div');
780782
div.textContent = Array(100).join('Lorem ipsum dolor sit amet');
781783
overlay.content.appendChild(div);
@@ -784,8 +786,10 @@
784786
overlay.$.content.style.padding = '20px';
785787
container.scrollTop = 100;
786788
resize(overlayPart.querySelector('.s'), 0, -50);
787-
await contentStabilized(dialog);
788-
expect(container.scrollTop).to.equal(100);
789+
window.requestAnimationFrame(() => {
790+
expect(container.scrollTop).to.equal(100);
791+
done();
792+
});
789793
});
790794
}
791795
});

0 commit comments

Comments
 (0)