Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import {
packagesByListingIdFrom,
} from "#routes/admin/attendee-page-data.ts";
import type { ExistingLine } from "#shared/db/attendees/atomic-update.ts";
import {
createPaidListing,
markAsRefunded,
setBookingLineQuantity,
setupRefundTest,
} from "#test/lib/server-refunds-helpers.ts";
import { expectHtmlResponse } from "#test-utils/assertions.ts";
import { describeWithEnv } from "#test-utils/db.ts";
import {
Expand All @@ -24,12 +30,6 @@ import {
} from "#test-utils/db-helpers/listings.ts";
import { testAttendee, testListingWithCount } from "#test-utils/factories.ts";
import { adminGet, withTestSession } from "#test-utils/session.ts";
import {
createPaidListing,
markAsRefunded,
setBookingLineQuantity,
setupRefundTest,
} from "./server-refunds-helpers.ts";

describeWithEnv("server (admin refund UI)", { db: true }, () => {
describe("listing page UI", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from "@std/expect";
import { describe, it as test } from "@std/testing/bdd";
import { apiError, apiErrorResponse } from "#routes/api/cors.ts";
import { expectCorsHeaders } from "./helpers.ts";
import { expectCorsHeaders } from "#test/routes/api/helpers.ts";

describe("apiError", () => {
test("responds with the envelope, the status, and CORS headers", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
checkoutResponse,
soldOutResponse,
} from "#routes/api/helpers.ts";
import { expectCorsHeaders } from "./helpers.ts";
import { expectCorsHeaders } from "#test/routes/api/helpers.ts";

describe("bookingSuccessResponse", () => {
test("answers with the ticket link and the balance left to collect", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expect } from "@std/expect";
import { describe, it as test } from "@std/testing/bdd";
import { stub } from "@std/testing/mock";
import { attendeesApi } from "#shared/db/attendees/api.ts";
import { attendeeWithNoBookings } from "#test/lib/server-attendee-form/helpers.ts";
import { describeWithEnv } from "#test-utils/db.ts";
import {
attendeeLineFields,
Expand All @@ -15,7 +16,6 @@ import {
} from "#test-utils/db-helpers/listings.ts";
import { withMocks } from "#test-utils/mocks.ts";
import { adminFormPost, adminGet } from "#test-utils/session.ts";
import { attendeeWithNoBookings } from "./helpers.ts";

describeWithEnv(
"server (unified attendee form) — error paths",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { expect } from "@std/expect";
import { describe, it as test } from "@std/testing/bdd";
import {
everydayDailyListing,
expectMixedStandardAndDailyLines,
submitNewAttendeeForm,
tomorrowInTz,
} from "#test/lib/server-attendee-form/helpers.ts";
import { expectHtmlResponse } from "#test-utils/assertions.ts";
import { describeWithEnv } from "#test-utils/db.ts";
import {
Expand All @@ -10,12 +16,6 @@ import {
} from "#test-utils/db-helpers/attendees.ts";
import { createTestListing } from "#test-utils/db-helpers/listings.ts";
import { adminFormPost, adminGet } from "#test-utils/session.ts";
import {
everydayDailyListing,
expectMixedStandardAndDailyLines,
submitNewAttendeeForm,
tomorrowInTz,
} from "./helpers.ts";

describeWithEnv(
"server (unified attendee form) — overbooking & mixed timing",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// jscpd:ignore-start
import { expect } from "@std/expect";
import { describe, it as test } from "@std/testing/bdd";
import { createQuestion } from "#test/lib/server-questions/helpers.ts";
import {
expectFlash,
expectFlashRedirect,
Expand All @@ -10,7 +11,6 @@ import {
} from "#test-utils/assertions.ts";
import { describeWithEnv } from "#test-utils/db.ts";
import { adminFormPost, adminGet } from "#test-utils/session.ts";
import { createQuestion } from "./helpers.ts";

// jscpd:ignore-end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { expect } from "@std/expect";
import { describe, it as test } from "@std/testing/bdd";
import { ListingDeactivatedBanner } from "#templates/admin/listings/overview.tsx";
import { testAttendee, testListingWithCount } from "#test-utils/factories.ts";

import {
registerListingTemplateHooks,
renderListingDetail,
} from "./helpers.ts";
} from "#test/templates/admin/listings/helpers.ts";
import { testAttendee, testListingWithCount } from "#test-utils/factories.ts";

registerListingTemplateHooks();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { expect } from "@std/expect";
import { describe, it as test } from "@std/testing/bdd";
import { ticketViewPage } from "#templates/tickets.tsx";
import { registerPublicTemplateHooks } from "#test/templates/public/helpers.ts";
import { testAttendee, testListingWithCount } from "#test-utils/factories.ts";

import { registerPublicTemplateHooks } from "./helpers.ts";

registerPublicTemplateHooks();

describe("ticketViewPage listing date and location", () => {
Expand Down