Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(loops): treat owner and placeholder names as missing first names

Richie McIlroy838a0d65f1c7
diff --git a/packages/database/loops/profile.ts b/packages/database/loops/profile.ts
index d3ff54ecd..9bd0fda3b 100644
--- a/packages/database/loops/profile.ts
+++ b/packages/database/loops/profile.ts
@@ -49,6 +49,7 @@ export type ProfileInput = {
};
const roleNames = new Set([
+ "account",
"accounts",
"admin",
"billing",
@@ -60,10 +61,13 @@ const roleNames = new Set([
"office",
"operations",
"ops",
+ "owner",
"post",
"sales",
"support",
"team",
+ "test",
+ "user",
]);
export const normalizeEmail = (email: string) => email.trim().toLowerCase();
diff --git a/scripts/loops/profile.test.ts b/scripts/loops/profile.test.ts
index 1108c2da4..fd9c0db89 100644
--- a/scripts/loops/profile.test.ts
+++ b/scripts/loops/profile.test.ts
@@ -80,7 +80,16 @@ test("first-name targeting follows the same nonblank rule as the greeting", () =
else fixture.source.first_name = firstName;
assert.equal(classifyProfile(fixture).capHasFirstName, false);
}
- for (const roleName of ["Admin", "Operations", "Team", "post"]) {
+ for (const roleName of [
+ "Admin",
+ "Operations",
+ "Team",
+ "post",
+ "Owner",
+ "USER",
+ "Test",
+ "account",
+ ]) {
fixture.source.first_name = roleName;
assert.equal(classifyProfile(fixture).capHasFirstName, false);
}