通过SendGrid发送事务api.我的模板(从Mailchimp移植)有条件(例如
*|IF:SHOWTHISSECTION|*
在Mailchimp语法中).这包括或排除基于变量的模板部分.
我在SendGrid中找不到模拟,是不是没有这个功能?我想根据替换变量的存在/不存在来抑制某些部分.
我在SendGrid中创建一个默认模板,用于它们的事务api.然后我添加一个带浮动的img链接:就在它里面.当我在他们的编辑器中点击"save"时,它会从我的图像中擦除浮动并在其中插入一个名为sg-image的新类.当然,这会弄乱我的风格.有人见过这个或知道为什么Sendgrid与我的模板一起?我找不到任何关于它的文档,他们的支持团队对我的错误报告没有反应.
之前:
<html>
<head>
<title></title>
</head>
<body>
<div><%body%></div>
<a href="%STORYURL1%" style="color:#333332;text-decoration:none">
<img src="%STORYPIC1%" height="122" style="float:right !important; border:1px solid #e5e5e5; margin-left:7px;"></a>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
后
<html>
<head>
<title></title>
</head>
<body>
<div><%body%></div>
<div><a href="%STORYURL1%" style="color:#333332;text-decoration:none"><span class="sg-image" data-imagelibrary="%7B%22width%22%3A0%2C%22height%22%3A%22122%22%2C%22alignment%22%3A%22%22%2C%22border%22%3A1%2C%22src%22%3A%22%25STORYPIC1%25%22%2C%22classes%22%3A%7B%22sg-image%22%3A1%7D%7D"><img height="122" src="%STORYPIC1%" style="border: 1px solid transparent; margin-left: 7px; height: 122px;" /></span></a></div>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
我有一个Ionic/Angular应用程序可以对文本选择做出反应(例如,对于eBook中的注释).用户可以在浏览器中突出显示文本,然后弹出一个菜单(稍微超越/扩充浏览器上下文菜单)以允许操作.我想用testcafe测试该功能.(呈现文本的组件会对浏览器中的"selectionchange"事件做出反应.)
除了选择文本命令(https://devexpress.github.io/testcafe/documentation/test-api/actions/select-text.html)之外,似乎无法模拟文本选择,但这仅限于输入,textareas或contenteditables.我的文字不是那些 - 它是直的
元素.
关于如何实现这一点的任何建议?
automated-tests ionic-framework e2e-testing testcafe angular