|
764 | 764 | const ios = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
|
765 | 765 | const isIOS10 = ios && String(ios).indexOf('OS 10') > -1;
|
766 | 766 | 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) => { |
768 | 768 | const textarea = document.createElement('vaadin-text-area');
|
769 | 769 | textarea.value = Array(20).join('Lorem ipsum dolor sit amet');
|
770 | 770 | overlay.content.appendChild(textarea);
|
771 | 771 | window.ShadyDOM && window.ShadyDOM.flush();
|
772 | 772 | overlay.$.content.style.padding = '20px';
|
773 | 773 | 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 | + }); |
776 | 778 | });
|
777 | 779 |
|
778 |
| - it('should not reset scroll position on resize', async() => { |
| 780 | + it('should not reset scroll position on resize', (done) => { |
779 | 781 | const div = document.createElement('div');
|
780 | 782 | div.textContent = Array(100).join('Lorem ipsum dolor sit amet');
|
781 | 783 | overlay.content.appendChild(div);
|
|
784 | 786 | overlay.$.content.style.padding = '20px';
|
785 | 787 | container.scrollTop = 100;
|
786 | 788 | 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 | + }); |
789 | 793 | });
|
790 | 794 | }
|
791 | 795 | });
|
|
0 commit comments