Skip to content

Commit

Permalink
Bug 1858633 - Add test to catch bug. r=credential-management-reviewer…
Browse files Browse the repository at this point in the history
…s,mtigley

Depends on D191716

Differential Revision: https://phabricator.services.mozilla.com/D191715
  • Loading branch information
issammani committed Oct 31, 2023
1 parent 34c0bed commit 5b88cf1
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,32 @@ add_task(async function test_new_login_url_has_correct_hash() {
}
);
});

add_task(async function test_no_logins_empty_url_hash() {
Services.logins.removeAllUserFacingLogins();
await BrowserTestUtils.withNewTab(
{
gBrowser,
url: TEST_URL_PATH,
},
async function () {
await waitForAppMenu();

const appMenuPasswordsButton = document.getElementById(
"appMenu-passwords-button"
);

const aboutLoginsTabPromise = BrowserTestUtils.waitForNewTab(
gBrowser,
url => new URL(url).hash === "",
true
);

EventUtils.synthesizeMouseAtCenter(appMenuPasswordsButton, {});

const aboutLoginsTab = await aboutLoginsTabPromise;

gBrowser.removeTab(aboutLoginsTab);
}
);
});

0 comments on commit 5b88cf1

Please sign in to comment.