0

我正在使用 Angular12、NX、Cypress 和 KendoUI。我需要通过表单元素测试标签。如何将 cypress-plugin-tab 添加到我的 e2e 测试中?

该指南说在 suppport/index.ts 文件中使用 require - 这对我不起作用。

我已执行npm install -D cypress-plugin-tab并添加require('cypress-plugin-tab')到 suppport/index.ts 我已将此代码添加到我的测试中:

   let password = 'Password';
   let input = cy.focused();
   
   input.type(username).tab().type(password);

这不起作用,因为它说它找不到“标签”。如何让“标签”在 Angular 中工作? 在此处输入图像描述

4

0 回答 0