diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js')
-rw-r--r-- | toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js b/toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js new file mode 100644 index 0000000000..4efbabfe3c --- /dev/null +++ b/toolkit/components/messaging-system/schemas/SpecialMessageActionSchemas/test/browser/browser_sma_show_migration_wizard.js @@ -0,0 +1,39 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +add_setup(async () => { + // Load the initial tab at example.com. This makes it so that if + // when loading the migration wizard in about:preferences, we'll + // load the about:preferences page in a new tab rather than overtaking + // the initial one. This makes cleanup of that opened tab more explicit. + let browser = gBrowser.selectedBrowser; + BrowserTestUtils.startLoadingURIString(browser, "https://example.com"); + await BrowserTestUtils.browserLoaded(browser); +}); + +add_task(async function test_SHOW_MIGRATION_WIZARD() { + let wizardOpened = BrowserTestUtils.waitForMigrationWizard(window); + + await SMATestUtils.executeAndValidateAction({ + type: "SHOW_MIGRATION_WIZARD", + }); + + let wizard = await wizardOpened; + ok(wizard, "Migration wizard opened"); + await BrowserTestUtils.removeTab(wizard); +}); + +add_task(async function test_SHOW_MIGRATION_WIZARD_WITH_SOURCE() { + let wizardOpened = BrowserTestUtils.waitForMigrationWizard(window); + + await SMATestUtils.executeAndValidateAction({ + type: "SHOW_MIGRATION_WIZARD", + data: { source: "chrome" }, + }); + + let wizard = await wizardOpened; + ok(wizard, "Migrator window opened when source param specified"); + await BrowserTestUtils.removeTab(wizard); +}); |