From 366043b1cabc1c7a153d88b2d5237f43d749d5b4 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Sat, 4 Nov 2023 23:31:24 +0000 Subject: [PATCH] test: update notification-banner query selector --- .../tests/integration/401-post-upload-unauthorized.js | 2 +- packages/endpoint-posts/tests/integration/500-post-create.js | 2 +- packages/endpoint-share/tests/integration/400-post-share.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/endpoint-files/tests/integration/401-post-upload-unauthorized.js b/packages/endpoint-files/tests/integration/401-post-upload-unauthorized.js index 37f8bcca3..6f8cf30c2 100644 --- a/packages/endpoint-files/tests/integration/401-post-upload-unauthorized.js +++ b/packages/endpoint-files/tests/integration/401-post-upload-unauthorized.js @@ -21,7 +21,7 @@ test("Returns 401 error uploading file", async (t) => { .attach("file", getFixture("file-types/photo.jpg", false), "photo.jpg"); const dom = new JSDOM(response.text); const result = dom.window.document.querySelector( - ".notification--error p", + `notification-banner[type="error"] p`, ).textContent; t.is(response.status, 401); diff --git a/packages/endpoint-posts/tests/integration/500-post-create.js b/packages/endpoint-posts/tests/integration/500-post-create.js index e632b2635..64710a8eb 100644 --- a/packages/endpoint-posts/tests/integration/500-post-create.js +++ b/packages/endpoint-posts/tests/integration/500-post-create.js @@ -20,7 +20,7 @@ test("Returns 500 error creating post", async (t) => { .send({ slug: "401" }); const dom = new JSDOM(response.text); const result = dom.window.document.querySelector( - ".notification--error p", + `notification-banner[type="error"] p`, ).textContent; t.is(response.status, 500); diff --git a/packages/endpoint-share/tests/integration/400-post-share.js b/packages/endpoint-share/tests/integration/400-post-share.js index 06c2d4077..782abf5f2 100644 --- a/packages/endpoint-share/tests/integration/400-post-share.js +++ b/packages/endpoint-share/tests/integration/400-post-share.js @@ -18,7 +18,7 @@ test("Returns 400 error publishing post", async (t) => { t.is(response.status, 400); t.regex( - result.querySelector(".notification--error p").textContent, + result.querySelector(`notification-banner[type="error"] p`).textContent, /\bNo bearer token provided by request\b/g, );