Files
calendar/packages/testing/performance/utils/helpers.js
T
Eunjae LeeGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
357c2882ad refactor: apply biome formatting to several packages (#27439)
* refactor: apply biome formatting to Phase 1 packages

Packages formatted:
- packages/app-store-cli
- packages/config
- packages/dayjs
- packages/debugging
- packages/embeds/embed-react
- packages/embeds/embed-snippet
- packages/kysely
- packages/platform/constants
- packages/platform/utils
- packages/testing
- packages/tsconfig

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: restore non-null assertions in embed-snippet to fix type error

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: remove ESM import from CommonJS config file

Biome incorrectly added 'import process from node:process' to a CommonJS
file that uses require(). This breaks Jest which expects CommonJS syntax.
The process global is already available in Node.js without explicit import.

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* refactor: exclude packages/embeds from Phase 1 formatting

Per user request, reverting all biome formatting changes in packages/embeds
to handle separately.

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

* fix: restore const enum for BookingLocations

Biome changed 'const enum' to 'enum' which is a semantic change.
Reverting to keep the PR purely formatting-only.

Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-05 07:24:34 -03:00

24 lines
721 B
JavaScript

import { check, group } from "k6";
import http from "k6/http";
import { BASE_URL, randomQueryParam, randomSleep } from "./config.js";
export function viewBookingPage(username, eventSlug) {
return group("View Booking Page", () => {
const url = `${BASE_URL}/${username}/${eventSlug}?${randomQueryParam()}`;
const response = http.get(url, {
tags: { name: "Booking Page" },
timeout: "30s",
});
check(response, {
"Booking page loaded": (r) => r.status === 200,
"Has booking form": (r) => r.body.includes('data-testid="day"') || r.body.includes("booking"),
"Response time acceptable": (r) => r.timings.duration < 5000,
});
randomSleep();
return response;
});
}