Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Errors
- This test gets skipped with pattern: os == 'linux' && !debug
- This test failed 6 times in the preceding 30 days. quicksearch this test
- Manifest: browser/components/translations/tests/browser/browser.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
/**
* Tests translating, and then immediately translating to a new language.
*/
add_task(async function test_translations_panel_retry() {
const { cleanup, resolveDownloads, runInPage } = await loadTestPage({
page: SPANISH_PAGE_URL,
languagePairs: LANGUAGE_PAIRS,
});
await FullPageTranslationsTestUtils.assertTranslationsButton(
{ button: true },
"The button is available."
);
await FullPageTranslationsTestUtils.assertPageIsUntranslated(runInPage);
await FullPageTranslationsTestUtils.openPanel({
onOpenPanel: FullPageTranslationsTestUtils.assertPanelViewDefault,
});
await FullPageTranslationsTestUtils.clickTranslateButton({
downloadHandler: resolveDownloads,
});
await FullPageTranslationsTestUtils.assertPageIsTranslated(
"es",
"en",
runInPage
);
await FullPageTranslationsTestUtils.openPanel({
onOpenPanel: FullPageTranslationsTestUtils.assertPanelViewRevisit,
});
FullPageTranslationsTestUtils.changeSelectedToLanguage("fr");
await FullPageTranslationsTestUtils.clickTranslateButton({
downloadHandler: resolveDownloads,
pivotTranslation: true,
});
await FullPageTranslationsTestUtils.assertPageIsTranslated(
"es",
"fr",
runInPage
);
await cleanup();
});