From 4d852b9e020383e91ec5746f0ba5a33c092f2473 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 28 Jun 2022 08:38:29 +0300 Subject: [PATCH] Check for severe warning level Signed-off-by: Alex Andreev --- ...talling-update-using-topbar-button.test.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx b/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx index 3325e1da7c..6e236aee61 100644 --- a/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx +++ b/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx @@ -168,6 +168,24 @@ describe("encourage user to update when sufficient time passed since update was jest.useRealTimers(); }) }) + + describe("given just enough time passes for severe update encouragement", () => { + beforeAll(() => { + jest.useFakeTimers(); + }) + + it("has severe emotional indication in the button", () => { + const button = rendered.getByTestId("update-button"); + + jest.advanceTimersByTime(daysToMilliseconds(26)); + + expect(button).toHaveAttribute("data-warning-level", "high") + }) + + afterAll(() => { + jest.useRealTimers(); + }) + }) }); }); });