Skip to content

Commit

Permalink
test: update notification-banner query selector
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Nov 4, 2023
1 parent f05887f commit 366043b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down

0 comments on commit 366043b

Please sign in to comment.