Bug 1853765 - Use BrowserTestUtils.is_visible instead of workaround in browser_file_migration.js. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D188517
This commit is contained in:
@@ -291,14 +291,8 @@ add_task(async function test_file_migration_error() {
|
||||
);
|
||||
|
||||
let errorMessageContainer = shadow.querySelector(".file-import-error");
|
||||
|
||||
// Using BrowserTestUtils.is_visible to check for the visibility of the
|
||||
// message seems to throw as it works its way up the ancestry and hits
|
||||
// the shadowRoot. We'll work around this by making sure that the
|
||||
// boundingClientRect has a width and height.
|
||||
let errorRect = errorMessageContainer.getBoundingClientRect();
|
||||
Assert.ok(
|
||||
errorRect.width && errorRect.height,
|
||||
BrowserTestUtils.is_visible(errorMessageContainer),
|
||||
"Should be showing the error message container"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user