Bug 1564861 - WorkerList should have unique keys r=Ola

Differential Revision: https://phabricator.services.mozilla.com/D38053

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Belén Albeza 2019-07-16 10:18:17 +00:00
Родитель 21ddd20f03
Коммит 6e6b55ce8f
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -41,7 +41,7 @@ class WorkerList extends Component {
return [
article(
{ className: "workers-container" },
{ className: "workers-container", key: "workers-container" },
Localized(
{ id: "serviceworker-list-header" },
h1({
@ -52,6 +52,7 @@ class WorkerList extends Component {
{},
workers.map(worker =>
Worker({
key: worker.id,
client,
isDebugEnabled: canDebugWorkers,
worker,
@ -62,6 +63,7 @@ class WorkerList extends Component {
Localized(
{
id: "serviceworker-list-aboutdebugging",
key: "serviceworkerlist-footer",
a: a({
className: "aboutdebugging-plug__link",
onClick: () => openTrustedLink("about:debugging#workers"),

Просмотреть файл

@ -23,10 +23,13 @@ add_task(async function() {
info("Wait until the service worker appears in the application panel");
await waitUntil(() => getWorkerContainers(doc).length > 0);
const workerContainer = getWorkerContainers(doc)[0];
let workerContainer = getWorkerContainers(doc)[0];
info("Wait until the unregister button is displayed for the service worker");
await waitUntil(() => workerContainer.querySelector(".js-unregister-button"));
await waitUntil(() => {
workerContainer = getWorkerContainers(doc)[0];
return workerContainer.querySelector(".js-unregister-button");
});
const scopeEl = workerContainer.querySelector(".js-sw-scope");
const expectedScope =