From 053acd46ea85843b2b85239a31fcc11b2ec77b30 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Wed, 29 Nov 2023 18:24:20 +0100 Subject: [PATCH] Only screenshot relevant parts in some Login UI tests (#21608) --- plugins/Login/tests/UI/Login_spec.js | 4 ++-- .../UI/expected-screenshots/Login_bruteforcelog_noentries.png | 4 ++-- .../expected-screenshots/Login_bruteforcelog_withentries.png | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js index 433ed548efb..cf76e3a8f34 100644 --- a/plugins/Login/tests/UI/Login_spec.js +++ b/plugins/Login/tests/UI/Login_spec.js @@ -235,7 +235,7 @@ describe("Login", function () { await page.goto(bruteForceLogUrl); - expect(await page.screenshot({ fullPage: true })).to.matchImage('bruteforcelog_noentries'); + expect(await page.screenshotSelector('#content')).to.matchImage('bruteforcelog_noentries'); }); it("should show brute force log url when there are entries", async function () { @@ -247,7 +247,7 @@ describe("Login", function () { await page.goto(bruteForceLogUrl); - expect(await page.screenshot({ fullPage: true })).to.matchImage('bruteforcelog_withentries'); + expect(await page.screenshotSelector('#content')).to.matchImage('bruteforcelog_withentries'); }); it("should show error when trying to attempt a log in through API", async function () { diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png index 8fb25dee523..4f50ab4ab0e 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48ebe019966d2aea9dda775948623d6e9af59b4eae196f34847aa1785cfa134a -size 49391 +oid sha256:3671e91f7caeb9c9ef4ba1af79e939fe3f0d14536515e328cff21cf13e1ed699 +size 5051 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png index f0f886db7c0..76e05f8e459 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31dec8dd99d1205b2ca56de220d04b2268a7eccc96ec92970b83fe17d7bd0502 -size 62282 +oid sha256:bfe379c46983a5ebe157042b04ec996567d2138a1d1a6b2455ec5b9ec9c7fe8f +size 19529