【发布时间】:2022-01-12 00:38:45
【问题描述】:
我正在尝试将段落的预期 innerText 与 testcafe e2e 测试中的文本模拟相匹配。预期的文本应该包含链接(由反应链接标签形成)。
await browser.expect((await Component.method).statement).eql('this is the mock text');
但是当测试运行时,这些链接的内部文本被 [object object] 替换。结果测试失败。
'AssertionError: this is [object object] text'. to deeply equal 'this is the mock text'
我会很感激有关如何解决此问题的一些见解?
【问题讨论】:
标签: testing automation automated-tests e2e-testing testcafe