Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
📸 Refresh the support docs screenshots (#3610)
Luke Vella55a37a7ff664
diff --git a/apps/docs/administrators/deleting-a-meeting-poll.mdx b/apps/docs/administrators/deleting-a-meeting-poll.mdxindex 27f64102d..f7fbf498c 100644--- a/apps/docs/administrators/deleting-a-meeting-poll.mdx+++ b/apps/docs/administrators/deleting-a-meeting-poll.mdx@@ -1,5 +1,5 @@----title: "Delete a Poll"+title: "Delete a poll"---<Warning>@@ -7,13 +7,13 @@ title: "Delete a Poll"participants and votes. This action cannot be undone.</Warning>-To delete a meeting poll, from the admin page:+To delete a meeting poll, from your poll page:-1. Click **Manage**+1. Click the **⋯** (Manage) button in the poll header1. Select **Delete** from the dropdown menu<Frame>- <img src="/images/administrators/delete-poll-menu.png" alt="The Manage menu on the poll admin page with Delete at the bottom" />+ <img src="/images/administrators/delete-poll-menu.png" alt="The Manage menu in the poll header with Delete at the bottom" /></Frame>1. Click **Delete** to confirmdiff --git a/apps/docs/administrators/editing-a-meeting-poll.mdx b/apps/docs/administrators/editing-a-meeting-poll.mdxindex 0eff7a2eb..e7e156b65 100644--- a/apps/docs/administrators/editing-a-meeting-poll.mdx+++ b/apps/docs/administrators/editing-a-meeting-poll.mdx@@ -1,5 +1,5 @@----title: "Edit a Poll"+title: "Edit a poll"description: "How to make changes to an existing meeting poll."---@@ -8,11 +8,11 @@ times, and its settings.<Steps><Step title="Open the edit page">- From the admin page, click **Manage** and select **Edit** from the- dropdown menu.+ On your poll page, click the **⋯** (Manage) button in the poll header+ and select **Edit**.<Frame caption="Admin controls">- <img src="/images/administrators/edit-poll-menu.png" alt="Manage dropdown menu with the Edit item"/>+ <img src="/images/administrators/edit-poll-menu.png" alt="Manage menu in the poll header with the Edit item"/></Frame></Step>@@ -61,7 +61,7 @@ you want a straight answer with no maybes.- **Time zone** - Once votes have been cast, the poll's time zone is locked.Changing it would move every option under participants who already answered.-- **Scheduled polls** - A poll that has been scheduled can no longer be edited,+- **Finalized polls** - Once a poll is finalized it can no longer be edited,because the calendar invites your participants received would not pick up- the change. The **Edit** item is hidden from the **Manage** menu for these- polls.+ the change. The **Edit** item is hidden from the **⋯** (Manage) menu for+ these polls.diff --git a/apps/docs/images/administrators/delete-poll-confirm.png b/apps/docs/images/administrators/delete-poll-confirm.pngindex 7f1a1717b..fe8488008 100644Binary files a/apps/docs/images/administrators/delete-poll-confirm.png and b/apps/docs/images/administrators/delete-poll-confirm.png differdiff --git a/apps/docs/images/administrators/delete-poll-menu.png b/apps/docs/images/administrators/delete-poll-menu.pngindex 5424aa346..675eed58d 100644Binary files a/apps/docs/images/administrators/delete-poll-menu.png and b/apps/docs/images/administrators/delete-poll-menu.png differdiff --git a/apps/docs/images/administrators/edit-poll-menu.png b/apps/docs/images/administrators/edit-poll-menu.pngindex 266786b88..c7358eab9 100644Binary files a/apps/docs/images/administrators/edit-poll-menu.png and b/apps/docs/images/administrators/edit-poll-menu.png differdiff --git a/apps/docs/images/administrators/edit-poll-page.png b/apps/docs/images/administrators/edit-poll-page.pngindex ec47e06bf..733bae1ae 100644Binary files a/apps/docs/images/administrators/edit-poll-page.png and b/apps/docs/images/administrators/edit-poll-page.png differdiff --git a/apps/docs/images/guide/voting-in-progress.png b/apps/docs/images/guide/voting-in-progress.pngindex a6e3eaa14..69730fbd6 100644Binary files a/apps/docs/images/guide/voting-in-progress.png and b/apps/docs/images/guide/voting-in-progress.png differdiff --git a/apps/docs/images/guide/voting-submitted.png b/apps/docs/images/guide/voting-submitted.pngindex ed5cb6c4c..7da9154e7 100644Binary files a/apps/docs/images/guide/voting-submitted.png and b/apps/docs/images/guide/voting-submitted.png differdiff --git a/apps/docs/images/guide/voting-submitting.png b/apps/docs/images/guide/voting-submitting.pngindex 211a20d92..f66dbc993 100644Binary files a/apps/docs/images/guide/voting-submitting.png and b/apps/docs/images/guide/voting-submitting.png differdiff --git a/apps/docs/images/integrations/zoom/poll-page.png b/apps/docs/images/integrations/zoom/poll-page.pngindex 2c8fc5825..ad881c8d6 100644Binary files a/apps/docs/images/integrations/zoom/poll-page.png and b/apps/docs/images/integrations/zoom/poll-page.png differdiff --git a/apps/docs/images/spaces/billing.png b/apps/docs/images/spaces/billing.pngindex 426d78d2f..144141846 100644Binary files a/apps/docs/images/spaces/billing.png and b/apps/docs/images/spaces/billing.png differdiff --git a/apps/docs/images/spaces/collaboration-settings.png b/apps/docs/images/spaces/collaboration-settings.pngindex b7b32e20c..d25cbe140 100644Binary files a/apps/docs/images/spaces/collaboration-settings.png and b/apps/docs/images/spaces/collaboration-settings.png differdiff --git a/apps/docs/images/spaces/manage-seats.png b/apps/docs/images/spaces/manage-seats.pngindex e8e0ca852..68d1437a6 100644Binary files a/apps/docs/images/spaces/manage-seats.png and b/apps/docs/images/spaces/manage-seats.png differdiff --git a/apps/docs/images/spaces/members.png b/apps/docs/images/spaces/members.pngindex 50abf87f2..7cc21f3fb 100644Binary files a/apps/docs/images/spaces/members.png and b/apps/docs/images/spaces/members.png differdiff --git a/apps/docs/images/unused/polls-page.png b/apps/docs/images/unused/polls-page.pngdeleted file mode 100644index 5a2dda7da..000000000Binary files a/apps/docs/images/unused/polls-page.png and /dev/null differdiff --git a/apps/docs/images/unused/response/editing-response-1.png b/apps/docs/images/unused/response/editing-response-1.pngdeleted file mode 100644index 96fe7d5da..000000000Binary files a/apps/docs/images/unused/response/editing-response-1.png and /dev/null differdiff --git a/apps/docs/images/unused/response/editing-response-2.png b/apps/docs/images/unused/response/editing-response-2.pngdeleted file mode 100644index a1f1b9737..000000000Binary files a/apps/docs/images/unused/response/editing-response-2.png and /dev/null differdiff --git a/apps/docs/images/unused/response/editing-response.png b/apps/docs/images/unused/response/editing-response.pngdeleted file mode 100644index a90728e83..000000000Binary files a/apps/docs/images/unused/response/editing-response.png and /dev/null differdiff --git a/apps/docs/images/unused/response/submitting-response-1.png b/apps/docs/images/unused/response/submitting-response-1.pngdeleted file mode 100644index 37924c3eb..000000000Binary files a/apps/docs/images/unused/response/submitting-response-1.png and /dev/null differdiff --git a/apps/docs/images/unused/response/submitting-response-2.png b/apps/docs/images/unused/response/submitting-response-2.pngdeleted file mode 100644index ac7bd7976..000000000Binary files a/apps/docs/images/unused/response/submitting-response-2.png and /dev/null differdiff --git a/apps/docs/images/unused/support.png b/apps/docs/images/unused/support.pngdeleted file mode 100644index 582739a12..000000000Binary files a/apps/docs/images/unused/support.png and /dev/null differdiff --git a/apps/docs/images/workflow/finalize-notify.png b/apps/docs/images/workflow/finalize-notify.pngindex 77ebef859..8f9b57e49 100644Binary files a/apps/docs/images/workflow/finalize-notify.png and b/apps/docs/images/workflow/finalize-notify.png differdiff --git a/apps/docs/images/workflow/finalize-summary.png b/apps/docs/images/workflow/finalize-summary.pngindex 307bf5b89..8947d4fe2 100644Binary files a/apps/docs/images/workflow/finalize-summary.png and b/apps/docs/images/workflow/finalize-summary.png differdiff --git a/apps/docs/images/workflow/finalize.png b/apps/docs/images/workflow/finalize.pngindex 24632c137..26cd42f45 100644Binary files a/apps/docs/images/workflow/finalize.png and b/apps/docs/images/workflow/finalize.png differdiff --git a/apps/docs/images/workflow/finalized.png b/apps/docs/images/workflow/finalized.pngindex 899da65e7..343171754 100644Binary files a/apps/docs/images/workflow/finalized.png and b/apps/docs/images/workflow/finalized.png differdiff --git a/apps/docs/images/workflow/invite-link.png b/apps/docs/images/workflow/invite-link.pngindex 499a615bd..39b76587c 100644Binary files a/apps/docs/images/workflow/invite-link.png and b/apps/docs/images/workflow/invite-link.png differdiff --git a/apps/docs/images/workflow/month-view.png b/apps/docs/images/workflow/month-view.pngindex b40ada1e6..bde4bb7e8 100644Binary files a/apps/docs/images/workflow/month-view.png and b/apps/docs/images/workflow/month-view.png differdiff --git a/apps/docs/images/workflow/new-poll-page.png b/apps/docs/images/workflow/new-poll-page.pngindex 361795c1d..a03e8c435 100644Binary files a/apps/docs/images/workflow/new-poll-page.png and b/apps/docs/images/workflow/new-poll-page.png differdiff --git a/apps/docs/images/workflow/poll-created.png b/apps/docs/images/workflow/poll-created.pngindex 49267edf0..4deeba8a4 100644Binary files a/apps/docs/images/workflow/poll-created.png and b/apps/docs/images/workflow/poll-created.png differdiff --git a/apps/docs/images/workflow/review.png b/apps/docs/images/workflow/review.pngindex 4653bf61e..faaff0072 100644Binary files a/apps/docs/images/workflow/review.png and b/apps/docs/images/workflow/review.png differdiff --git a/apps/docs/images/workflow/voting.png b/apps/docs/images/workflow/voting.pngindex 526c596af..82175c34d 100644Binary files a/apps/docs/images/workflow/voting.png and b/apps/docs/images/workflow/voting.png differdiff --git a/apps/docs/images/workflow/week-view.png b/apps/docs/images/workflow/week-view.pngindex 6c74092d3..976eaeffe 100644Binary files a/apps/docs/images/workflow/week-view.png and b/apps/docs/images/workflow/week-view.png differdiff --git a/apps/docs/spaces/billing.mdx b/apps/docs/spaces/billing.mdxindex b8185dfb2..cdffd229a 100644--- a/apps/docs/spaces/billing.mdx+++ b/apps/docs/spaces/billing.mdx@@ -22,7 +22,7 @@ A seat represents one team member's access to your Pro space. Each member you in### Seat Allocation- **Used Seats**: Current number of active members in your space- **Total Seats**: Maximum number of members you're paying for-- **Available Seats**: Remaining seats you can fill without increasing your bill+- **Available seats**: Remaining seats you can fill without increasing your bill<Note>You must have at least as many total seats as used seats. You cannot reduce total seats below your current member count.@@ -35,7 +35,7 @@ You must have at least as many total seats as used seats. You cannot reduce totaTo upgrade your space to Pro:<Steps>- <Step title="Navigate to Billing Settings">+ <Step title="Navigate to billing settings">Go to your space settings and select the "Billing" tab.</Step>@@ -59,8 +59,8 @@ You can adjust your seat allocation at any time from the Billing page of a Pro s#### Adding SeatsWhen you need to invite more members:-1. **Navigate to Billing Settings**-2. **Click "Manage Seats"**+1. **Navigate to billing settings**+2. **Click "Manage seats"**3. **Increase the seat count** to accommodate new members4. **Confirm the changes** - billing will be prorated immediately@@ -68,7 +68,7 @@ When you need to invite more members:To reduce costs when team members leave:1. **Remove members** from your space first-2. **Go to Billing Settings** and click "Manage Seats"+2. **Go to billing settings** and click "Manage seats"3. **Decrease the seat count** to match your current needs4. **Confirm the changes** - adjustments will be credited to your next billdiff --git a/apps/docs/spaces/managing-seats.mdx b/apps/docs/spaces/managing-seats.mdxindex 72107b2fa..667c17bf0 100644--- a/apps/docs/spaces/managing-seats.mdx+++ b/apps/docs/spaces/managing-seats.mdx@@ -11,7 +11,7 @@ Seats represent the number of team members who can be part of your Pro space. Ea<Card title="Seat Management" icon="users">- **Used Seats**: Current number of active members in your space- **Total Seats**: Maximum number of members you're paying for-- **Available Seats**: Remaining seats you can use to invite new members+- **Available seats**: Remaining seats you can use to invite new members</Card>## Accessing Seat Management@@ -27,12 +27,12 @@ To manage your seats, you need to:When you need to invite more team members than your current seat allocation allows:<Steps>- <Step title="Go to Billing Settings">+ <Step title="Go to billing settings">Navigate to your space settings and click on the "Billing" tab.</Step>- <Step title="Click Manage Seats">- Once your space is upgraded to Pro, you'll see a "Manage Seats" button on the billing page.+ <Step title="Click Manage seats">+ Once your space is upgraded to Pro, you'll see a "Manage seats" button on the billing page.<Frame><img src="/images/spaces/billing.png" alt="The Billing page showing the active Pro plan with the Manage seats button" />@@ -69,8 +69,8 @@ To reduce costs when team members leave or you no longer need as many seats:</Warning></Step>- <Step title="Access Manage Seats">- Go to your space billing settings and click the "Manage Seats" button.+ <Step title="Access Manage seats">+ Go to your space billing settings and click the "Manage seats" button.</Step><Step title="Decrease Seat Count">@@ -99,7 +99,7 @@ To reduce costs when team members leave or you no longer need as many seats:<AccordionGroup><Accordion title="Adding team members mid-month">If you need to add 3 new team members in the middle of your billing cycle:- 1. Increase seats by 3 through "Manage Seats"+ 1. Increase seats by 3 through "Manage seats"2. Pay prorated amount for remaining days immediately3. Invite the new members right away4. Next billing cycle includes full cost for all seats@@ -108,7 +108,7 @@ To reduce costs when team members leave or you no longer need as many seats:<Accordion title="Team member leaves unexpectedly">When a team member leaves:1. Remove them from your space in the Members tab- 2. Go to "Manage Seats" and reduce seat count by 1+ 2. Go to "Manage seats" and reduce seat count by 13. Receive credit for unused seat time on next bill4. Seat becomes available if you need to invite someone else later</Accordion>@@ -129,7 +129,7 @@ If you're having trouble managing seats, check these common issues:</Warning>- **Cannot reduce seats**: Make sure you've removed members first - you cannot have fewer seats than active members-- **Manage Seats button missing**: Ensure your space is upgraded to Pro - this feature is only available for Pro spaces+- **Manage seats button missing**: Ensure your space is upgraded to Pro - this feature is only available for Pro spaces- **Not authorized**: Only space owners can manage seats - members and admins cannot access this feature- **Payment issues**: Ensure your payment method is up to date before making seat changesdiff --git a/apps/docs/spaces/members.mdx b/apps/docs/spaces/members.mdxindex 1e0298a5b..6e9dbfd70 100644--- a/apps/docs/spaces/members.mdx+++ b/apps/docs/spaces/members.mdx@@ -53,7 +53,7 @@ Before inviting members, ensure:</Step><Step title="Send Invitation">- Click "Invite Member" and enter the email address of the person you want to invite.+ Click "Invite member" and enter the email address of the person you want to invite.<Note>The person will receive an email invitation with instructions to join your space.@@ -135,12 +135,12 @@ To cancel a pending invitation:### Seat Allocation- **Used Seats**: Equal to your current member count-- **Available Seats**: How many more members you can invite+- **Available seats**: How many more members you can invite- **Total Seats**: Your current subscription level### Adding Members vs Adding Seats<Steps>- <Step title="Check Available Seats">+ <Step title="Check available seats">Before inviting someone, verify you have available seats in your billing settings.</Step>diff --git a/apps/docs/workflow/create.mdx b/apps/docs/workflow/create.mdxindex 2923c6ed2..bfeee1d1b 100644--- a/apps/docs/workflow/create.mdx+++ b/apps/docs/workflow/create.mdx@@ -10,8 +10,8 @@ straight to [app.rallly.co/new](https://app.rallly.co/new).<Steps><Step title="Enter event details">Give your poll a title so participants know what the event is about. You- can also add a location and click **Add description** to include extra- information for your participants.+ can also click **Add location**, **Add video call** or **Add description**+ to include extra information for your participants.<Frame><img src="/images/workflow/new-poll-page.png" alt="New poll page"/>@@ -43,7 +43,7 @@ straight to [app.rallly.co/new](https://app.rallly.co/new).</Step><Step title="Create your poll">- Click **Create poll**. Your poll opens with the **Share** dialog ready, so+ Click **Create poll** at the bottom of the page. Your poll opens with the **Share** dialog ready, soyou can copy the invite link or start inviting people by email right away.<Frame>diff --git a/apps/docs/workflow/schedule.mdx b/apps/docs/workflow/schedule.mdxindex 03eeda36d..bf3e54d55 100644--- a/apps/docs/workflow/schedule.mdx+++ b/apps/docs/workflow/schedule.mdx@@ -35,7 +35,8 @@ invite to the participants you choose and closes the poll to new responses.<Step title="Check the summary and finalize">The summary shows the date, the location and the video call the event willcarry. If the poll has a video call, its link is created at this point.- Click **Finalize**.+ Click **Finalize and notify** (or **Finalize** if you chose not to notify+ anyone).This will:@@ -52,7 +53,7 @@ invite to the participants you choose and closes the poll to new responses.added to a calendar with one click.<Frame>- <img src="/images/workflow/finalized.png" alt="Scheduled poll"/>+ <img src="/images/workflow/finalized.png" alt="Finalized poll showing the scheduled date"/></Frame></Step>diff --git a/packages/screenshots/capture/docs-conferencing.spec.ts b/packages/screenshots/capture/docs-conferencing.spec.tsindex 75306390c..317397106 100644--- a/packages/screenshots/capture/docs-conferencing.spec.ts+++ b/packages/screenshots/capture/docs-conferencing.spec.ts@@ -124,9 +124,17 @@ const proSpaceId = "space-2";const proMembershipId = "sm-2";let savedBranding: { primaryColor: string | null; showBranding: boolean };let savedLastSelectedAt: Date;+// The poll form's calendar starts on Monday whatever the shared dev user+// was last set to.+let savedWeekStart: number | null;test.beforeAll(async () => {await clearConnections();+ ({ weekStart: savedWeekStart } = await prisma.user.findUniqueOrThrow({+ where: { id: userId },+ select: { weekStart: true },+ }));+ await prisma.user.update({ where: { id: userId }, data: { weekStart: 1 } });({ lastSelectedAt: savedLastSelectedAt } =await prisma.spaceMember.findUniqueOrThrow({where: { id: proMembershipId },@@ -147,6 +155,10 @@ test.beforeAll(async () => {});test.afterAll(async () => {await clearConnections();+ await prisma.user.update({+ where: { id: userId },+ data: { weekStart: savedWeekStart },+ });await prisma.space.update({where: { id: proSpaceId },data: savedBranding,diff --git a/packages/screenshots/capture/docs-spaces.spec.ts b/packages/screenshots/capture/docs-spaces.spec.tsindex f0cd1745d..9b94d6d03 100644--- a/packages/screenshots/capture/docs-spaces.spec.ts+++ b/packages/screenshots/capture/docs-spaces.spec.ts@@ -28,7 +28,29 @@ async function settledBox(locator: Locator) {return box;}+// The Pro space, so billing shows a subscription. Selecting it is undone+// after the run so other captures start from the space they expect.+const proMembershipId = "sm-2";+let savedLastSelectedAt: Date;+// The seeded owner's avatar is a real photo; the members list shows+// initials instead.+let savedImage: string | null;+test.beforeAll(async () => {+ ({ image: savedImage } = await prisma.user.findUniqueOrThrow({+ where: { id: "user-1" },+ select: { image: true },+ }));+ await prisma.user.update({ where: { id: "user-1" }, data: { image: null } });+ ({ lastSelectedAt: savedLastSelectedAt } =+ await prisma.spaceMember.findUniqueOrThrow({+ where: { id: proMembershipId },+ select: { lastSelectedAt: true },+ }));+ await prisma.spaceMember.update({+ where: { id: proMembershipId },+ data: { lastSelectedAt: new Date() },+ });await prisma.poll.delete({ where: { id: pollId } }).catch(() => {});await prisma.poll.create({data: {@@ -46,6 +68,14 @@ test.beforeAll(async () => {});test.afterAll(async () => {+ await prisma.user.update({+ where: { id: "user-1" },+ data: { image: savedImage },+ });+ await prisma.spaceMember.update({+ where: { id: proMembershipId },+ data: { lastSelectedAt: savedLastSelectedAt },+ });await prisma.poll.delete({ where: { id: pollId } }).catch(() => {});});@@ -80,6 +110,22 @@ test("spaces and poll admin screenshots", async ({ page }) => {},});+ await page.goto("/settings/general");+ const collaboration = page+ .getByText("How members work together in this space")+ .locator("xpath=ancestor::*[contains(@class, 'rounded')][1]");+ await collaboration.waitFor();+ await page.waitForLoadState("networkidle");+ // The app scrolls an inner container, so the section is brought into the+ // viewport before its box is read.+ await collaboration.evaluate((el) => el.scrollIntoView({ block: "center" }));+ const collaborationBox = await collaboration.boundingBox();+ if (!collaborationBox) throw new Error("collaboration section not visible");+ await page.screenshot({+ path: docsImagePath("spaces/collaboration-settings"),+ clip: collaborationBox,+ });+await page.goto(`/poll/${pollId}`);await page.waitForLoadState("networkidle");await page.getByRole("button", { name: "Manage" }).click();diff --git a/packages/screenshots/capture/docs-workflow.spec.ts b/packages/screenshots/capture/docs-workflow.spec.tsnew file mode 100644index 000000000..dc4a97a07--- /dev/null+++ b/packages/screenshots/capture/docs-workflow.spec.ts@@ -0,0 +1,404 @@+import type { Locator, Page } from "@playwright/test";+import { expect, test } from "@playwright/test";+import { prisma } from "@rallly/database";+import { deleteAllMessages, loginWithEmail } from "@rallly/test-helpers";+import dayjs from "dayjs";+import timezone from "dayjs/plugin/timezone";+import utc from "dayjs/plugin/utc";+import { customAlphabet } from "nanoid";+import { docsImagePath } from "./helpers";++dayjs.extend(utc);+dayjs.extend(timezone);++/**+ * The screenshots in docs/workflow (create, invite, finalize) and+ * docs/administrators/editing-a-meeting-poll.mdx, taken as a Pro organizer+ * walking one poll from creation to a final date.+ */++const timeZone = "America/New_York";+// Shaped like a real invite link id, since the Share dialog shows it.+const pollId = "Kq7xN2pLw9Rt";+const organizer = {+ id: "docs-workflow-user",+ email: "[email protected]",+ name: "Jessie Smith",+};+const spaceId = "docs-workflow-space";++// Monday of next month's second week, so every slot sits in one month and+// one calendar week.+const base = (() => {+ let date = dayjs()+ .tz(timeZone)+ .add(1, "month")+ .startOf("month")+ .add(7, "day");+ while (date.day() !== 1) {+ date = date.add(1, "day");+ }+ return date;+})();++// Mirrors generateAccessToken in apps/web/src/features/poll/utils.ts, which+// this package cannot import. Participant.token has no DB default.+const generateAccessToken = customAlphabet(+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",+ 32,+);++test.use({+ viewport: { width: 1280, height: 800 },+ deviceScaleFactor: 2,+ timezoneId: timeZone,+});++// Dev routes compile on first hit.+test.describe.configure({ mode: "serial", timeout: 240_000 });++async function deleteOrganizer() {+ // Cascades through the space and its polls.+ await prisma.user.delete({ where: { id: organizer.id } }).catch(() => {});+}++test.beforeAll(async () => {+ await deleteAllMessages();+ await deleteOrganizer();++ await prisma.user.create({+ data: {+ ...organizer,+ emailVerified: true,+ timeZone,+ weekStart: 1,+ spaces: { create: { id: spaceId, name: "Personal", tier: "pro" } },+ memberOf: {+ create: { id: `${spaceId}-member`, spaceId, role: "ADMIN" },+ },+ },+ });++ // Built from a wall clock string: dayjs keeps the original offset across+ // date arithmetic, which is wrong on the other side of a DST change.+ const slot = (day: number) => ({+ startTime: dayjs+ .tz(`${base.add(day, "day").format("YYYY-MM-DD")} 12:00`, timeZone)+ .toDate(),+ duration: 60,+ });++ const participants = [+ { name: "Emma Davis", email: "[email protected]" },+ { name: "Liam Nguyen", email: "[email protected]" },+ { name: "Olivia Brown", email: "[email protected]" },+ ];++ const poll = await prisma.poll.create({+ data: {+ id: pollId,+ title: "Monthly Meetup",+ description: "Hey everyone, please choose the dates that work for you!",+ location: "Joe's Coffee Shop",+ userId: organizer.id,+ spaceId,+ status: "open",+ timeZone,+ options: { create: [slot(0), slot(1), slot(2), slot(3)] },+ participants: {+ create: participants.map((participant) => ({+ ...participant,+ token: generateAccessToken(),+ })),+ },+ },+ include: {+ options: { orderBy: { startTime: "asc" } },+ participants: true,+ },+ });++ const votes: Record<string, ("yes" | "no" | "ifNeedBe")[]> = {+ "Emma Davis": ["yes", "no", "yes", "yes"],+ "Liam Nguyen": ["ifNeedBe", "yes", "no", "yes"],+ "Olivia Brown": ["yes", "yes", "ifNeedBe", "yes"],+ };++ await prisma.vote.createMany({+ data: poll.participants.flatMap((participant) =>+ poll.options.map((option, i) => ({+ optionId: option.id,+ participantId: participant.id,+ pollId: poll.id,+ type: votes[participant.name]?.[i] ?? "yes",+ })),+ ),+ });++ const emma = poll.participants.find((p) => p.name === "Emma Davis");+ await prisma.pollInvite.createMany({+ data: [+ {+ pollId,+ email: "[email protected]",+ token: generateAccessToken(),+ openedAt: new Date(),+ participantId: emma?.id,+ },+ {+ pollId,+ email: "[email protected]",+ token: generateAccessToken(),+ openedAt: new Date(),+ },+ {+ pollId,+ email: "[email protected]",+ token: generateAccessToken(),+ },+ ],+ });+});++test.afterAll(deleteOrganizer);++async function settle(page: Page) {+ await page.waitForLoadState("networkidle");+ await page.evaluate(() => document.fonts.ready);+ await page.mouse.move(0, 0);+}++// Invite links read as production rather than the dev server.+async function showProductionUrls(page: Page) {+ await page.evaluate((origin) => {+ const walker = document.createTreeWalker(+ document.body,+ NodeFilter.SHOW_TEXT,+ );+ while (walker.nextNode()) {+ const node = walker.currentNode;+ if (node.nodeValue?.includes(origin)) {+ node.nodeValue = node.nodeValue.replaceAll(+ origin,+ "https://app.rallly.co",+ );+ }+ }+ }, new URL(page.url()).origin);+}++// A dialog animates in, so its box is only final once two reads agree.+async function settledDialog(locator: Locator) {+ await locator.waitFor();+ let previous = "";+ await expect+ .poll(+ async () => {+ const current = JSON.stringify(await locator.boundingBox());+ const settled = current === previous;+ previous = current;+ return settled;+ },+ { intervals: [150] },+ )+ .toBe(true);+}++// The floating create bar is marked once so it can be found again while+// hidden, when it no longer has an accessible role.+async function setCreateBarVisibility(+ page: Page,+ visibility: "hidden" | "visible",+) {+ await page.evaluate((value) => {+ let bar = document.querySelector<HTMLElement>("[data-docs-create-bar]");+ if (!bar) {+ const button = Array.from(document.querySelectorAll("button")).find(+ (el) => el.textContent?.trim() === "Create poll",+ );+ let el: HTMLElement | null = button ?? null;+ while (+ el &&+ !["fixed", "sticky"].includes(getComputedStyle(el).position)+ ) {+ el = el.parentElement;+ }+ if (!el) throw new Error("create bar not found");+ el.dataset.docsCreateBar = "";+ bar = el;+ }+ bar.style.visibility = value;+ }, visibility);+}++async function captureCard(page: Page, card: Locator, name: string) {+ await settle(page);+ await card.evaluate((el) => el.scrollIntoView({ block: "center" }));+ const box = await card.boundingBox();+ if (!box) throw new Error("card not visible");+ await page.screenshot({ path: docsImagePath(name), clip: box });+}++test("create a poll", async ({ page }) => {+ await deleteAllMessages();+ await loginWithEmail(page, { email: organizer.email });+ await page.goto("/new");+ await page.getByLabel("Title").fill("Monthly Meetup");++ // "Add location" is a menu when the organizer can add a video call and a+ // plain button otherwise; either way the address field appears after.+ const locationField = page.getByLabel("Location", { exact: true });+ await expect(async () => {+ await page+ .getByRole("button", { name: "Add location" })+ .click({ timeout: 2000 });+ const addressItem = page.getByRole("menuitem", { name: "Address" });+ await addressItem.or(locationField).first().waitFor({ timeout: 2000 });+ if (await addressItem.isVisible()) {+ await addressItem.click();+ }+ await expect(locationField).toBeVisible({ timeout: 2000 });+ }).toPass();+ await locationField.fill("Joe's Coffee Shop");++ await page.getByRole("button", { name: "Add description" }).click();+ await page.locator('[contenteditable="true"]').click();+ await page.keyboard.type(+ "Hey everyone, please choose the dates that work for you!",+ );+ await page.evaluate(() => {+ (document.activeElement as HTMLElement | null)?.blur();+ for (const el of document.querySelectorAll("*")) {+ el.scrollTop = 0;+ }+ window.scrollTo(0, 0);+ });+ await settle(page);+ await page.screenshot({ path: docsImagePath("workflow/new-poll-page") });++ await page.getByRole("button", { name: "Next month" }).click();+ for (let day = 0; day < 4; day++) {+ await page+ .getByRole("button", {+ name: String(base.add(day, "day").date()),+ exact: true,+ })+ .click();+ }+ await page.getByText("Add time option").first().waitFor();++ // The floating create bar would sit over the calendar card.+ await setCreateBarVisibility(page, "hidden");+ const card = page+ .locator("#create-poll > div > div")+ .filter({ hasText: "Lock time zone" });+ await captureCard(page, card, "workflow/month-view");++ await page.getByRole("tab", { name: "Week view" }).click();+ await expect(page.getByText("Add time option").first()).toBeHidden();+ await captureCard(page, card, "workflow/week-view");+ await setCreateBarVisibility(page, "visible");++ await page.getByRole("button", { name: "Create poll" }).click();+ const share = page.getByRole("dialog", { name: "Share" });+ await settledDialog(share);+ await settle(page);+ await showProductionUrls(page);+ await page.screenshot({ path: docsImagePath("workflow/poll-created") });+});++test("invite participants", async ({ page, browser }) => {+ // A guest, so the invite page shows no organizer header.+ const guest = await browser.newContext({+ viewport: { width: 1280, height: 800 },+ deviceScaleFactor: 2,+ timezoneId: timeZone,+ });+ const guestPage = await guest.newPage();+ await guestPage.goto(`/invite/${pollId}`);+ await guestPage.getByRole("heading", { name: "Monthly Meetup" }).waitFor();+ const selectors = guestPage.getByTestId("vote-selector");+ await selectors.first().waitFor();+ // Clicks cycle yes, if need be, no.+ await selectors.nth(0).click();+ await selectors.nth(1).click();+ await selectors.nth(1).click();+ await selectors.nth(3).click();+ await settle(guestPage);+ // Vote changes animate.+ await guestPage.waitForTimeout(600);+ await guestPage.screenshot({ path: docsImagePath("workflow/voting") });+ await guest.close();++ await deleteAllMessages();+ await loginWithEmail(page, { email: organizer.email });+ await page.goto(`/poll/${pollId}`);+ await page.getByText("Olivia Brown").waitFor();+ await settle(page);+ await page.screenshot({ path: docsImagePath("workflow/review") });++ await page.getByRole("button", { name: "Share" }).click();+ const share = page.getByRole("dialog", { name: "Share" });+ await share.getByText("[email protected]").waitFor();+ await settledDialog(share);+ await settle(page);+ await showProductionUrls(page);+ await page.screenshot({ path: docsImagePath("workflow/invite-link") });+});++test("edit a poll", async ({ page }) => {+ await deleteAllMessages();+ await loginWithEmail(page, { email: organizer.email });+ await page.goto(`/poll/${pollId}`);+ await page.getByText("Olivia Brown").waitFor();+ await page.getByRole("button", { name: "Manage" }).click();+ await page.getByRole("menuitem", { name: "Edit" }).waitFor();+ await page.waitForTimeout(300);+ await page.screenshot({+ path: docsImagePath("administrators/edit-poll-menu"),+ });++ await page.getByRole("menuitem", { name: "Edit" }).click();+ await page.getByRole("button", { name: "Save changes" }).waitFor();+ await settle(page);+ await page.screenshot({+ path: docsImagePath("administrators/edit-poll-page"),+ });+});++test("finalize", async ({ page }) => {+ await deleteAllMessages();+ await loginWithEmail(page, { email: organizer.email });+ await page.goto(`/poll/${pollId}`);+ await page.getByText("Olivia Brown").waitFor();++ await page.getByRole("button", { name: "Finalize" }).click();+ // The dialog takes each step's title as its name.+ const dialog = page.getByRole("dialog");+ await dialog.getByText("Finalize poll").waitFor();+ await settledDialog(dialog);+ await settle(page);+ await page.screenshot({ path: docsImagePath("workflow/finalize") });++ await dialog+ .getByRole("button")+ .filter({ hasText: base.format("D") })+ .first()+ .click();+ await page.getByRole("dialog", { name: "Notify participants" }).waitFor();+ await settledDialog(dialog);+ await settle(page);+ await page.screenshot({ path: docsImagePath("workflow/finalize-notify") });++ await dialog.getByRole("button", { name: "Next" }).click();+ await page.getByRole("dialog", { name: "Summary" }).waitFor();+ await settledDialog(dialog);+ await settle(page);+ await page.screenshot({ path: docsImagePath("workflow/finalize-summary") });++ await dialog.getByRole("button", { name: /^Finalize/ }).click();+ await dialog.getByRole("button", { name: "Back to poll" }).click();+ await page.getByText("Add to calendar", { exact: false }).first().waitFor();+ await settle(page);+ await page.screenshot({ path: docsImagePath("workflow/finalized") });+});diff --git a/packages/screenshots/playwright.config.ts b/packages/screenshots/playwright.config.tsindex e91842680..e56889e72 100644--- a/packages/screenshots/playwright.config.ts+++ b/packages/screenshots/playwright.config.ts@@ -15,7 +15,10 @@ export default defineConfig({baseURL,},webServer: {- command: `NEXT_PUBLIC_BASE_URL=${baseURL} NEXT_PUBLIC_COOKIE_DOMAIN= RATE_LIMIT_ENABLED=false HIDE_DEV_INDICATOR=true pnpm --filter @rallly/web exec next dev --port ${PORT}`,+ // Every conferencing provider is on, as in production, so the docs show+ // the full video call menu. Webex falls back to a placeholder app because+ // the dev .env carries no Webex credentials and nothing here calls it.+ command: `NEXT_PUBLIC_BASE_URL=${baseURL} NEXT_PUBLIC_COOKIE_DOMAIN= RATE_LIMIT_ENABLED=false HIDE_DEV_INDICATOR=true CONFERENCING_PROVIDERS=google-meet,zoom,microsoft-teams,webex WEBEX_CLIENT_ID=\${WEBEX_CLIENT_ID:-screenshots} WEBEX_CLIENT_SECRET=\${WEBEX_CLIENT_SECRET:-screenshots} pnpm --filter @rallly/web exec next dev --port ${PORT}`,url: baseURL,reuseExistingServer: true,timeout: 120000,