-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(viewer): 🐛 Fix multiple cc bcc email
- Loading branch information
1 parent
b6ba40e
commit 7b8169c
Showing
4 changed files
with
196 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
apps/viewer/playwright/fixtures/typebots/sendEmail.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"id": "cl1rxxg6l334509lhv44f8qnx", | ||
"createdAt": "2022-04-09T14:16:43.053Z", | ||
"updatedAt": "2022-04-12T14:34:44.287Z", | ||
"icon": null, | ||
"name": "My typebot", | ||
"ownerId": "ckzmhmiey001009mnzt5nkxu8", | ||
"publishedTypebotId": null, | ||
"folderId": null, | ||
"blocks": [ | ||
{ | ||
"id": "cl1rxxg6k000009lhd0mgfy5i", | ||
"steps": [ | ||
{ | ||
"id": "cl1rxxg6k000109lh2is0gfua", | ||
"type": "start", | ||
"label": "Start", | ||
"blockId": "cl1rxxg6k000009lhd0mgfy5i", | ||
"outgoingEdgeId": "cl1w8rhzs000f2e694836a1k3" | ||
} | ||
], | ||
"title": "Start", | ||
"graphCoordinates": { "x": 0, "y": 0 } | ||
}, | ||
{ | ||
"id": "cl1w8repd000b2e69fwiqsd00", | ||
"graphCoordinates": { "x": 364, "y": -2 }, | ||
"title": "Group #1", | ||
"steps": [ | ||
{ | ||
"id": "cl1w8repg000c2e699jqwrepg", | ||
"blockId": "cl1w8repd000b2e69fwiqsd00", | ||
"type": "choice input", | ||
"options": { "buttonLabel": "Send", "isMultipleChoice": false }, | ||
"items": [ | ||
{ | ||
"id": "cl1w8repg000d2e69d8xnkqeq", | ||
"stepId": "cl1w8repg000c2e699jqwrepg", | ||
"type": 0, | ||
"content": "Send email", | ||
"outgoingEdgeId": "cl1w8rkoo000i2e69hs60pk0q" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "cl1w8rjaf000g2e69cqd2bwvk", | ||
"graphCoordinates": { "x": 715, "y": -10 }, | ||
"title": "Group #2", | ||
"steps": [ | ||
{ | ||
"id": "cl1w8rjai000h2e695uvoimq7", | ||
"blockId": "cl1w8rjaf000g2e69cqd2bwvk", | ||
"type": "Email", | ||
"options": { | ||
"credentialsId": "send-email-credentials", | ||
"recipients": ["baptiste.arnaud95@gmail.com"], | ||
"replyTo": "contact@baptiste-arnaud.fr", | ||
"cc": ["test1@gmail.com", "test2@gmail.com"], | ||
"bcc": ["test3@gmail.com", "test4@gmail.com"], | ||
"subject": "Hey!", | ||
"body": "Test email" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"variables": [ | ||
{ "id": "vcl1rxxovn000z2e69y6t9dxge", "name": "Score" }, | ||
{ "id": "vcl1rylq5v00042e69tdml6hi3", "name": "Age" } | ||
], | ||
"edges": [ | ||
{ | ||
"from": { | ||
"blockId": "cl1rxxg6k000009lhd0mgfy5i", | ||
"stepId": "cl1rxxg6k000109lh2is0gfua" | ||
}, | ||
"to": { "blockId": "cl1w8repd000b2e69fwiqsd00" }, | ||
"id": "cl1w8rhzs000f2e694836a1k3" | ||
}, | ||
{ | ||
"from": { | ||
"blockId": "cl1w8repd000b2e69fwiqsd00", | ||
"stepId": "cl1w8repg000c2e699jqwrepg", | ||
"itemId": "cl1w8repg000d2e69d8xnkqeq" | ||
}, | ||
"to": { "blockId": "cl1w8rjaf000g2e69cqd2bwvk" }, | ||
"id": "cl1w8rkoo000i2e69hs60pk0q" | ||
} | ||
], | ||
"theme": { | ||
"chat": { | ||
"inputs": { | ||
"color": "#303235", | ||
"backgroundColor": "#FFFFFF", | ||
"placeholderColor": "#9095A0" | ||
}, | ||
"buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, | ||
"hostAvatar": { | ||
"url": "https://avatars.githubusercontent.com/u/16015833?v=4", | ||
"isEnabled": true | ||
}, | ||
"hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, | ||
"guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } | ||
}, | ||
"general": { "font": "Open Sans", "background": { "type": "None" } } | ||
}, | ||
"settings": { | ||
"general": { | ||
"isBrandingEnabled": true, | ||
"isInputPrefillEnabled": true, | ||
"isNewResultOnRefreshEnabled": false | ||
}, | ||
"metadata": { | ||
"description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." | ||
}, | ||
"typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } | ||
}, | ||
"publicId": null, | ||
"customDomain": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import test, { expect } from '@playwright/test' | ||
import { | ||
createSmtpCredentials, | ||
importTypebotInDatabase, | ||
} from '../services/database' | ||
import cuid from 'cuid' | ||
import path from 'path' | ||
import { typebotViewer } from '../services/selectorUtils' | ||
import { SmtpCredentialsData } from 'models' | ||
|
||
const mockSmtpCredentials: SmtpCredentialsData = { | ||
from: { | ||
email: 'tobin.tillman65@ethereal.email', | ||
name: 'John Smith', | ||
}, | ||
host: 'smtp.ethereal.email', | ||
port: 587, | ||
isTlsEnabled: false, | ||
username: 'tobin.tillman65@ethereal.email', | ||
password: 'Ty9BcwCBrK6w8AG2hx', | ||
} | ||
|
||
test('should send an email', async ({ page }) => { | ||
const typebotId = cuid() | ||
const credentialsId = 'send-email-credentials' | ||
await createSmtpCredentials(credentialsId, mockSmtpCredentials) | ||
await importTypebotInDatabase( | ||
path.join(__dirname, '../fixtures/typebots/sendEmail.json'), | ||
{ id: typebotId, publicId: `${typebotId}-public` } | ||
) | ||
await page.goto(`/${typebotId}-public`) | ||
await typebotViewer(page).locator('text=Send email').click() | ||
const response = await page.waitForResponse((resp) => | ||
resp.request().url().includes(`/api/integrations/email`) | ||
) | ||
const { previewUrl } = await response.json() | ||
await page.goto(previewUrl) | ||
await expect(page.locator('text="Hey!"')).toBeVisible() | ||
await expect(page.locator('text="John Smith"')).toBeVisible() | ||
await expect(page.locator('text="<test1@gmail.com>" >> nth=0')).toBeVisible() | ||
await expect(page.locator('text="<test2@gmail.com>" >> nth=0')).toBeVisible() | ||
await expect( | ||
page.locator('text="<baptiste.arnaud95@gmail.com>" >> nth=0') | ||
).toBeVisible() | ||
}) |
7b8169c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
builder-v2-typebot-io.vercel.app
app.typebot.io
builder-v2-git-main-typebot-io.vercel.app
7b8169c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
landing-page-v2-git-main-typebot-io.vercel.app
www.get-typebot.com
typebot.io
get-typebot.com
www.typebot.io
landing-page-v2-typebot-io.vercel.app
7b8169c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2-alpha – ./apps/viewer
apr.nigerias.io
ar.nigerias.io
an.nigerias.io
aso.nigerias.io
sakuranembro.it
stan.vselise.com
faqs.nigerias.io
am.nigerias.io
apo.nigerias.io
bot.upfunnel.art
chat.hayurihijab.com
zap.techadviser.in
gcase.barrettamario.it
piazzatorre.barrettamario.it
forms.webisharp.com
bot.incusservices.com
c23111azqw.nigerias.io
onboarding.libertydreamcare.ie
boyfriend-breakup.riku.ai
aibot.angrybranding.co.uk
personal-trainer.barrettamario.it
viewer-v2-alpha-git-main-typebot-io.vercel.app
viewer-v2-alpha-typebot-io.vercel.app
7b8169c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
bot.joof.it
yoda.riku.ai
bergamo.store
bot.tvbeat.it
bots.bridge.ai
bot.jesopizz.it
chat.hayuri.id
app.yvon.earth
talk.gocare.io
gollum.riku.ai
fitness.riku.ai
bot.contakit.com
zap.fundviser.in
bot.rihabilita.it
viewer.typebot.io
bot.dsignagency.com
bot.danyservice.it
chatbot.matthesv.de
demo.wemakebots.xyz
88584434.therpm.club
bot.barrettamario.it
92109660.therpm.club
bot.coachayongzul.com
hello.advergreen.com
bot.digitalpointer.id
bot.eikju.photography
bot.outstandbrand.com
criar.somaperuzzo.com
bot.robertohairlab.it
bot.ilmuseoaiborghi.it
form.bridesquadapp.com
bot.pratikmandalia.com
michaeljackson.riku.ai
91375310.actualizar.xyz
88152257.actualizar.xyz
87656003.actualizar.xyz
link.venturasuceder.com
arrivalx2.wpwakanda.com
bot.hotelplayarimini.it
invite.bridesquadapp.com
bot.amicidisanfaustino.it
forms.hiabhaykulkarni.com
chat.thehomebuyersusa.com
typebot-viewer.vercel.app
bot.adventureconsulting.hu
casestudyemb.wpwakanda.com
herbalife.barrettamario.it
chat.atlasoutfittersk9.com
liveconvert.kandalearn.com
homepageonly.wpwakanda.com
mainmenu1one.wpwakanda.com
tarian.theiofoundation.org
bot.pinpointinteractive.com
liveconvert2.kandalearn.com
bot.seidinembroseanchetu.it
bot.polychromes-project.com
forms.escoladeautomacao.com.br
bot.seidibergamoseanchetu.it
bot.studiotecnicoimmobiliaremerelli.it
viewer-v2-typebot-io.vercel.app
viewer-v2-git-main-typebot-io.vercel.app