Loading browser/components/newtab/aboutwelcome/lib/AboutWelcomeDefaults.jsm +1 −10 Original line number Diff line number Diff line Loading @@ -364,16 +364,7 @@ const MR_ABOUT_WELCOME_DEFAULT = { }, primary_button: { label: { string_id: "mr2022-onboarding-gratitude-primary-button-label", }, action: { type: "OPEN_FIREFOX_VIEW", navigate: true, }, }, secondary_button: { label: { string_id: "mr2022-onboarding-gratitude-secondary-button-label", string_id: "mr2-onboarding-start-browsing-button-label", }, action: { navigate: true, Loading browser/components/newtab/test/browser/browser_aboutwelcome_multistage_mr.js +14 −23 Original line number Diff line number Diff line Loading @@ -3,13 +3,6 @@ const { AboutWelcomeParent } = ChromeUtils.import( "resource:///actors/AboutWelcomeParent.jsm" ); const { assertFirefoxViewTabSelected, closeFirefoxViewTab, } = ChromeUtils.importESModule( "resource://testing-common/FirefoxViewTestUtils.sys.mjs" ); const { AWScreenUtils } = ChromeUtils.import( "resource://activity-stream/lib/AWScreenUtils.jsm" ); Loading Loading @@ -240,7 +233,7 @@ add_task(async function test_aboutwelcome_mr_template_get_started() { await popPrefs(); }); add_task(async function test_aboutwelcome_show_firefox_view() { add_task(async function test_aboutwelcome_gratitude() { const TEST_CONTENT = [ { id: "AW_GRATITUDE", Loading @@ -261,15 +254,6 @@ add_task(async function test_aboutwelcome_show_firefox_view() { label: { string_id: "mr2022-onboarding-gratitude-primary-button-label", }, action: { type: "OPEN_FIREFOX_VIEW", navigate: true, }, }, secondary_button: { label: { string_id: "mr2022-onboarding-gratitude-secondary-button-label", }, action: { navigate: true, }, Loading @@ -283,19 +267,26 @@ add_task(async function test_aboutwelcome_show_firefox_view() { // execution await test_screen_content( browser, "doesn't render secondary button on gratitude screen", //Expected selectors ["main.UPGRADE_GRATITUDE"], ["main.AW_GRATITUDE", "button[value='primary_button']"], //Unexpected selectors: [] ["button[value='secondary_button']"] ); await clickVisibleButton(browser, ".action-buttons button.primary"); // verification await BrowserTestUtils.waitForEvent(gBrowser, "TabSwitchDone"); assertFirefoxViewTabSelected(gBrowser.ownerGlobal); // make sure the button navigates to newtab await test_screen_content( browser, //Expected selectors ["body.activity-stream"], //Unexpected selectors: ["main.AW_GRATITUDE"] ); // cleanup await SpecialPowers.popPrefEnv(); // for setAboutWelcomeMultiStage closeFirefoxViewTab(gBrowser.ownerGlobal); await cleanup(); }); Loading
browser/components/newtab/aboutwelcome/lib/AboutWelcomeDefaults.jsm +1 −10 Original line number Diff line number Diff line Loading @@ -364,16 +364,7 @@ const MR_ABOUT_WELCOME_DEFAULT = { }, primary_button: { label: { string_id: "mr2022-onboarding-gratitude-primary-button-label", }, action: { type: "OPEN_FIREFOX_VIEW", navigate: true, }, }, secondary_button: { label: { string_id: "mr2022-onboarding-gratitude-secondary-button-label", string_id: "mr2-onboarding-start-browsing-button-label", }, action: { navigate: true, Loading
browser/components/newtab/test/browser/browser_aboutwelcome_multistage_mr.js +14 −23 Original line number Diff line number Diff line Loading @@ -3,13 +3,6 @@ const { AboutWelcomeParent } = ChromeUtils.import( "resource:///actors/AboutWelcomeParent.jsm" ); const { assertFirefoxViewTabSelected, closeFirefoxViewTab, } = ChromeUtils.importESModule( "resource://testing-common/FirefoxViewTestUtils.sys.mjs" ); const { AWScreenUtils } = ChromeUtils.import( "resource://activity-stream/lib/AWScreenUtils.jsm" ); Loading Loading @@ -240,7 +233,7 @@ add_task(async function test_aboutwelcome_mr_template_get_started() { await popPrefs(); }); add_task(async function test_aboutwelcome_show_firefox_view() { add_task(async function test_aboutwelcome_gratitude() { const TEST_CONTENT = [ { id: "AW_GRATITUDE", Loading @@ -261,15 +254,6 @@ add_task(async function test_aboutwelcome_show_firefox_view() { label: { string_id: "mr2022-onboarding-gratitude-primary-button-label", }, action: { type: "OPEN_FIREFOX_VIEW", navigate: true, }, }, secondary_button: { label: { string_id: "mr2022-onboarding-gratitude-secondary-button-label", }, action: { navigate: true, }, Loading @@ -283,19 +267,26 @@ add_task(async function test_aboutwelcome_show_firefox_view() { // execution await test_screen_content( browser, "doesn't render secondary button on gratitude screen", //Expected selectors ["main.UPGRADE_GRATITUDE"], ["main.AW_GRATITUDE", "button[value='primary_button']"], //Unexpected selectors: [] ["button[value='secondary_button']"] ); await clickVisibleButton(browser, ".action-buttons button.primary"); // verification await BrowserTestUtils.waitForEvent(gBrowser, "TabSwitchDone"); assertFirefoxViewTabSelected(gBrowser.ownerGlobal); // make sure the button navigates to newtab await test_screen_content( browser, //Expected selectors ["body.activity-stream"], //Unexpected selectors: ["main.AW_GRATITUDE"] ); // cleanup await SpecialPowers.popPrefEnv(); // for setAboutWelcomeMultiStage closeFirefoxViewTab(gBrowser.ownerGlobal); await cleanup(); });