parent
a3a2a0f914
commit
f0359a5c18
9 changed files with 66 additions and 12 deletions
|
@ -1348,7 +1348,17 @@ describe("<SessionManagerTab />", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("renders qr code login section", async () => {
|
||||
it("does not render qr code login section when disabled", () => {
|
||||
settingsValueSpy.mockReturnValue(false);
|
||||
const { queryByText } = render(getComponent());
|
||||
|
||||
expect(settingsValueSpy).toHaveBeenCalledWith("feature_qr_signin_reciprocate_show");
|
||||
|
||||
expect(queryByText("Sign in with QR code")).toBeFalsy();
|
||||
});
|
||||
|
||||
it("renders qr code login section when enabled", async () => {
|
||||
settingsValueSpy.mockImplementation((settingName) => settingName === "feature_qr_signin_reciprocate_show");
|
||||
const { getByText } = render(getComponent());
|
||||
|
||||
// wait for versions call to settle
|
||||
|
@ -1358,6 +1368,7 @@ describe("<SessionManagerTab />", () => {
|
|||
});
|
||||
|
||||
it("enters qr code login section when show QR code button clicked", async () => {
|
||||
settingsValueSpy.mockImplementation((settingName) => settingName === "feature_qr_signin_reciprocate_show");
|
||||
const { getByText, getByTestId } = render(getComponent());
|
||||
// wait for versions call to settle
|
||||
await flushPromises();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue