mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-04 04:29:01 +01:00
Cover shared sizing for loading and ready credential cards
This commit is contained in:
1 parent
6012d9f424
commit
8eb82c5f9d
1 file changed
+9
@@ -222,6 +222,15 @@ describe("the connect step's cards", () => {
|
||||
expect(plain!.hasAttribute("aria-describedby")).toBe(false);
|
||||
});
|
||||
|
||||
it.each([false, true])("shares the dialog sizing rule across card layouts (loading=%s)", (loading) => {
|
||||
render(<>
|
||||
<OnboardingLoginCard instruction="Enter API key" loading={loading}><input /></OnboardingLoginCard>
|
||||
<OnboardingLoginCard instruction="Sign in" revealTogether loading={loading}><button>Sign in</button></OnboardingLoginCard>
|
||||
</>);
|
||||
expect(Array.from(container.children).every(card => card.matches("[data-login-card]"))).toBe(true);
|
||||
expect(container.children).toHaveLength(2);
|
||||
});
|
||||
|
||||
it("holds one height across the card's waiting and ready states", () => {
|
||||
// The card opens on a spinner and then fills. Both states share a floor, so
|
||||
// the footer below is pushed down once for one event rather than twice —
|
||||
|
||||
Reference in new issue
Block a user