Skip to content

Commit

Permalink
test: Bump timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jan 20, 2025
1 parent ad24946 commit b77f302
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions editor.planx.uk/src/@planx/components/List/Public/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe("Building a list", () => {
expect(addItemButton).not.toBeInTheDocument();
});

test("Adding an item", { timeout: 25000 }, async () => {
test("Adding an item", { timeout: 35000 }, async () => {
const { getAllByTestId, getByTestId, user } = setup(
<ListComponent {...mockZooProps} />,
);
Expand Down Expand Up @@ -198,7 +198,7 @@ describe("Building a list", () => {
).toBeInTheDocument();
});

test("Editing an item", { timeout: 35000 }, async () => {
test("Editing an item", { timeout: 45000 }, async () => {
// Setup three cards
const { getAllByTestId, getByTestId, user } = setup(
<ListComponent {...mockZooProps} />,
Expand Down Expand Up @@ -251,7 +251,7 @@ describe("Building a list", () => {

test(
"Removing an item when all cards are inactive",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
// Setup three cards
const {
Expand Down Expand Up @@ -330,7 +330,7 @@ describe("Building a list", () => {

test(
"Removing an item when another card is active",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
// Setup two cards
const { getAllByTestId, getByTestId, user } = setup(
Expand Down Expand Up @@ -367,7 +367,7 @@ describe("Building a list", () => {

test(
"Cancelling an invalid (new) item removes it",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
const { getAllByTestId, getByText, user, queryAllByTestId, getByTestId } =
setup(<ListComponent {...mockZooProps} />);
Expand Down Expand Up @@ -398,7 +398,7 @@ describe("Building a list", () => {

test(
"Cancelling a valid (existing) item resets previous state",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
const {
getByLabelText,
Expand Down Expand Up @@ -648,7 +648,7 @@ describe("Form validation and error handling", () => {

test(
"an error displays if the maximum number of items is exceeded",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
const { user, getAllByTestId, getByTestId, getByText } = setup(
<ListComponent {...mockZooProps} />,
Expand Down Expand Up @@ -721,7 +721,7 @@ describe("Form validation and error handling", () => {

test(
"Input data is displayed in the inactive card view",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
const { getByText, user } = setup(<ListComponent {...mockZooProps} />);

Expand Down Expand Up @@ -773,7 +773,7 @@ test(
describe("Payload generation", () => {
it(
"generates a valid payload on submission (Zoo)",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
const handleSubmit = vi.fn();
const { getByTestId, user } = setup(
Expand All @@ -795,7 +795,7 @@ describe("Payload generation", () => {

it(
"generates a valid payload with summary stats on submission (Units)",
{ timeout: 25000 },
{ timeout: 35000 },
async () => {
const handleSubmit = vi.fn();
const { getByTestId, user, getByRole, getAllByRole, getByLabelText } =
Expand Down Expand Up @@ -920,7 +920,6 @@ const fillInResponse = async (user: UserEvent) => {
const countyInput = screen.getByLabelText("County (optional)");
const postcodeInput = screen.getByLabelText("Postcode");
const countryInput = screen.getByLabelText("Country (optional)");

await user.type(line1Input, "134 Corstorphine Rd");
await user.type(line2Input, "Corstorphine");
await user.type(townInput, "Edinburgh");
Expand Down

0 comments on commit b77f302

Please sign in to comment.