From fe883312342182f2467720594731ca64f32cc4de Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 2 Feb 2023 10:26:01 +0100 Subject: [PATCH] fix(tests): make sure the POST to fixtures.json goes through --- tests/ui_tests/reporting/testreport.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ui_tests/reporting/testreport.js b/tests/ui_tests/reporting/testreport.js index cb5f8cfc9..2b34433a4 100644 --- a/tests/ui_tests/reporting/testreport.js +++ b/tests/ui_tests/reporting/testreport.js @@ -24,11 +24,11 @@ function itemKeyFromIndexEntry(entry) { } -function markState(state) { +async function markState(state) { if (state === 'update') { let lastIndex = decodeURIComponent(window.location.href).split("/").reverse()[0].lastIndexOf(".") let stem = decodeURIComponent(window.location.href).split("/").reverse()[0].slice(0, lastIndex) - fetch('http://localhost:8000/fixtures.json', { + await fetch('http://localhost:8000/fixtures.json', { method: 'POST', headers: { 'Accept': 'application/json', @@ -38,7 +38,7 @@ function markState(state) { "test": stem, "hash": document.body.dataset.actualHash }) - }).then(() => {}) + }) window.localStorage.setItem(itemKeyFromOneTest(), 'ok') } else { window.localStorage.setItem(itemKeyFromOneTest(), state)