Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix fully!!

Steven Tey548b1f6c3ea7
diff --git a/apps/web/playwright/api/program-applications/program-applications.spec.ts b/apps/web/playwright/api/program-applications/program-applications.spec.ts
index 4b5d5c44e4..2852d82924 100644
--- a/apps/web/playwright/api/program-applications/program-applications.spec.ts
+++ b/apps/web/playwright/api/program-applications/program-applications.spec.ts
@@ -160,13 +160,9 @@ test.describe("program applications", () => {
approvedUs,
] = seeded;
- // Application-level socials take precedence over the partner's platforms;
- // verifiedAt is only kept when both identifiers match.
await prisma.programApplication.update({
where: { id: pendingUsWithPlatforms.id },
data: {
- website: VERIFIED_WEBSITE,
- twitter: "application_handle",
formData: {
fields: [
{
@@ -290,15 +286,20 @@ test.describe("program applications", () => {
{ label: "How will you promote us?", value: "Newsletter" },
{ label: "Anything else?", value: null },
]);
- expect(data[0].partner.platforms).toStrictEqual([
+ // Platforms have no defined order in the response.
+ const platforms = [...(data[0].partner.platforms ?? [])].sort((a, b) =>
+ a.type.localeCompare(b.type),
+ );
+
+ expect(platforms).toStrictEqual([
{
- type: "website",
- identifier: VERIFIED_WEBSITE,
+ type: "twitter",
+ identifier: "application_handle",
verifiedAt: VERIFIED_AT.toISOString(),
},
{
- type: "twitter",
- identifier: "application_handle",
+ type: "website",
+ identifier: VERIFIED_WEBSITE,
verifiedAt: VERIFIED_AT.toISOString(),
},
{