mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
fix: lint
This commit is contained in:
@@ -8,11 +8,11 @@ describe("FormActions", () => {
|
||||
it("renders submit and cancel buttons", () => {
|
||||
render(
|
||||
<FormActions
|
||||
isSubmitting={false}
|
||||
isPending={false}
|
||||
isSubmitting={false}
|
||||
onCancel={vi.fn()}
|
||||
submitLabel="Create"
|
||||
pendingLabel="Creating..."
|
||||
submitLabel="Create"
|
||||
/>,
|
||||
)
|
||||
expect(screen.getByRole("button", { name: "Create" })).toBeInTheDocument()
|
||||
@@ -22,11 +22,11 @@ describe("FormActions", () => {
|
||||
it("shows pending label when submitting", () => {
|
||||
render(
|
||||
<FormActions
|
||||
isSubmitting={true}
|
||||
isPending={false}
|
||||
isSubmitting={true}
|
||||
onCancel={vi.fn()}
|
||||
submitLabel="Create"
|
||||
pendingLabel="Creating..."
|
||||
submitLabel="Create"
|
||||
/>,
|
||||
)
|
||||
expect(
|
||||
@@ -37,11 +37,11 @@ describe("FormActions", () => {
|
||||
it("shows pending label when isPending", () => {
|
||||
render(
|
||||
<FormActions
|
||||
isSubmitting={false}
|
||||
isPending={true}
|
||||
isSubmitting={false}
|
||||
onCancel={vi.fn()}
|
||||
submitLabel="Create"
|
||||
pendingLabel="Creating..."
|
||||
submitLabel="Create"
|
||||
/>,
|
||||
)
|
||||
expect(
|
||||
@@ -52,11 +52,11 @@ describe("FormActions", () => {
|
||||
it("disables both buttons when submitting", () => {
|
||||
render(
|
||||
<FormActions
|
||||
isSubmitting={true}
|
||||
isPending={false}
|
||||
isSubmitting={true}
|
||||
onCancel={vi.fn()}
|
||||
submitLabel="Create"
|
||||
pendingLabel="Creating..."
|
||||
submitLabel="Create"
|
||||
/>,
|
||||
)
|
||||
expect(screen.getByRole("button", { name: "Creating..." })).toBeDisabled()
|
||||
@@ -68,11 +68,11 @@ describe("FormActions", () => {
|
||||
const user = userEvent.setup()
|
||||
render(
|
||||
<FormActions
|
||||
isSubmitting={false}
|
||||
isPending={false}
|
||||
isSubmitting={false}
|
||||
onCancel={onCancel}
|
||||
submitLabel="Create"
|
||||
pendingLabel="Creating..."
|
||||
submitLabel="Create"
|
||||
/>,
|
||||
)
|
||||
await user.click(screen.getByRole("button", { name: "Cancel" }))
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { render, screen } from "@testing-library/react"
|
||||
import userEvent from "@testing-library/user-event"
|
||||
import type { ReactNode } from "react"
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { ThemeProvider, useTheme } from "./theme-provider"
|
||||
|
||||
@@ -96,9 +96,7 @@ describe("staleTime", () => {
|
||||
})
|
||||
|
||||
it("attached user policies use staleTime", () => {
|
||||
expect(iamAttachedUserPoliciesQueryOptions("admin").staleTime).toBe(
|
||||
300_000,
|
||||
)
|
||||
expect(iamAttachedUserPoliciesQueryOptions("admin").staleTime).toBe(300_000)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user