From 0abb9cfa7bb8a1e90610d3869f3dbf3aafa6b484 Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Mon, 17 Apr 2023 00:51:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20add=20cypress-cloud=20p?= =?UTF-8?q?lugin=20to=20run=20tests=20in=20the=20cloud=20=F0=9F=94=A7=20ch?= =?UTF-8?q?ore:=20add=20currents.config.js=20file=20to=20store=20project?= =?UTF-8?q?=20and=20record=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- currents.config.js | 4 ++++ cypress.config.e2e.ts | 1 + cypress/plugins/index.ts | 4 +++- package.json | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 currents.config.js diff --git a/currents.config.js b/currents.config.js new file mode 100644 index 00000000..2fcc81fd --- /dev/null +++ b/currents.config.js @@ -0,0 +1,4 @@ +module.exports = { + projectId: "HX4KqP", + recordKey: "jIRQOVdnRn4skGjL", +}; diff --git a/cypress.config.e2e.ts b/cypress.config.e2e.ts index ead0c292..952abb08 100644 --- a/cypress.config.e2e.ts +++ b/cypress.config.e2e.ts @@ -1,4 +1,5 @@ import { defineConfig } from "cypress"; +import { cloudPlugin } from "cypress-cloud/plugin"; import { config } from "./cypress.config"; export default defineConfig({ diff --git a/cypress/plugins/index.ts b/cypress/plugins/index.ts index a0545d97..4cca1baa 100644 --- a/cypress/plugins/index.ts +++ b/cypress/plugins/index.ts @@ -12,11 +12,13 @@ // This function is called when a project is opened or re-opened (e.g. due to // the project's config changing) +import { cloudPlugin } from "cypress-cloud/plugin"; + export default ( on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions ) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config - return config; + return cloudPlugin(on, config); }; diff --git a/package.json b/package.json index 74ca3301..4a574e18 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@vue/test-utils": "2.3.2", "@vue/tsconfig": "0.1.3", "cypress": "12.9.0", + "cypress-cloud": "1.7.3", "cypress-real-events": "1.7.6", "eslint": "8.38.0", "eslint-plugin-cypress": "2.13.2",