角度2とe2eテストを開始しましたが、分度器を使って空白部分をクリックすると、ブートストラップ4モーダルを閉じようとしています。角度2 e2eテスト
it('should close the login modal when the blank space outside of the modal is clicked',() => {
element(by.tagName('body')).click().then(function() {
browser.sleep(250);
expect(element(by.id('myModal')).isDisplayed()).toBeFalsy();
});
});
を...と私も試してみた:私が試した
it('should close the login modal when the blank space outside of the modal is clicked',() => {
browser.actions()
.mouseMove(element(by.id('login_modal')), -20, -20)
.click().then(function() {
browser.sleep(250);
expect(element(by.id('login_modal')).isDisplayed()).toBeFalsy();
});
});
私は角2世新たなんだ、そう答えはおそらく明らかです。助けをありがとうございました。
質問/問題は何ですか。それは閉じていないのですか? – wswebcreation
正しい。私は空白の領域をクリックしてモーダルを閉じることができません。 –