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.

add e2e tests for email

Steven Tey3e69c199fdf9
diff --git a/apps/web/tests/partners/list-partners.test.ts b/apps/web/tests/partners/list-partners.test.ts
index c1c9d25c5d..6c91f0c27b 100644
--- a/apps/web/tests/partners/list-partners.test.ts
+++ b/apps/web/tests/partners/list-partners.test.ts
@@ -81,6 +81,24 @@ describe.sequential("GET /partners", async () => {
});
});
+ test("filters partners by email", async () => {
+ const { data, status } = await http.get<EnrolledPartnerProps[]>({
+ path: "/partners",
+ query: {
+ email: E2E_PARTNER.email,
+ },
+ });
+
+ expect(status).toEqual(200);
+ expect(Array.isArray(data)).toBe(true);
+
+ // All partners should have the specified email
+ data.forEach((partner) => {
+ const parsed = EnrolledPartnerSchema.parse(partner);
+ expect(parsed.email).toBe(E2E_PARTNER.email);
+ });
+ });
+
test("filters partners by tenantId", async () => {
const { data, status } = await http.get<EnrolledPartnerProps[]>({
path: "/partners",
diff --git a/apps/web/tests/utils/resource.ts b/apps/web/tests/utils/resource.ts
index f3daff2f35..606775e934 100644
--- a/apps/web/tests/utils/resource.ts
+++ b/apps/web/tests/utils/resource.ts
@@ -83,6 +83,7 @@ export const E2E_PROGRAM = {
export const E2E_PARTNER = {
id: "pn_H4TB2V5hDIjpqB7PwrxESoY3",
+ email: "[email protected]",
tenantId: "4149092f-7265-4002-98d9-da9f8e67e1fb",
};