简体   繁体   English

cypress 中缺少集成和插件文件夹

[英]Integration and Plugin folders missing in cypress

I have generated cypress folder..In that i could see only support and fixture folders.我已经生成了 cypress 文件夹。我只能看到 support 和 fixture 文件夹。 Integration and plugin folders are missing...pls help to resolve缺少集成和插件文件夹...请帮助解决

  1. You have to first initialize the project using `npm init.您必须首先使用 npm init 初始化项目。

  2. Then install cypress using npm install cypress , as of today the current version is 10.3.0, which should be installed.然后使用npm install cypress ,截至今天当前版本是 10.3.0,应该安装。

  3. Then You have to run the command npx cypress open , then you should see a window like this:然后你必须运行命令npx cypress open ,然后你应该看到一个像这样的窗口:

测试赛跑者

  1. Click on E2E Testing and then cypress will give you a bunch of default configs that it's gonna add.单击E2E 测试,然后 cypress 将为您提供一堆将添加的默认配置。

配置文件

  1. Click on Continue button, you should get the Browser selection page.单击继续按钮,您应该得到浏览器选择页面。

选择浏览器

  1. Click on Start E2E testing in Chrome and you get Create your first spec page.单击在 Chrome 中开始 E2E 测试,您将获得创建您的第一个规范页面。

在此处输入图像描述

  1. Click on Scaffold Example Specs and then Okay, I got it .单击Scaffold Example Specs ,然后单击Okay, I got it This will add all the example specs to your e2e folder.这会将所有示例规范添加到您的 e2e 文件夹中。

带有规格的测试运行器

  1. After this you should see all the required files and cypress folder is created:在此之后,您应该看到所有必需的文件并创建了 cypress 文件夹:

在此处输入图像描述

The plugins file is no longer supported after Cypress version 10.0.0.在赛普拉斯 10.0.0 版之后不再支持插件文件。 You should use config.js or config.ts您应该使用 config.js 或 config.ts

Encountered this myself, following what I now believe is an out-of-date tutorial.我自己遇到了这个,遵循我现在认为是过时的教程。 Apparently both the Integration folder and Plugins file/folder are deprecated, no longer created at install/setup.显然,集成文件夹和插件文件/文件夹都已弃用,不再在安装/设置时创建。

Although it is difficult to interpret the documentation:虽然很难解释文档:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM