-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Enable cypress to run cucumber tests
Add libraries needed to run cucumber tests with cypress. Signed-off-by: Michal Polovka <mpolovka@redhat.com>
- Loading branch information
Showing
6 changed files
with
8,050 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
import { defineConfig } from "cypress"; | ||
import createBundler from "@bahmutov/cypress-esbuild-preprocessor"; | ||
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor"; | ||
import createEsbuildPlugin from "@badeball/cypress-cucumber-preprocessor/esbuild"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: "https://server.ipa.demo/ipa/modern_ui/", | ||
}, | ||
hosts: { | ||
"server.ipa.demo": "127.0.0.1", | ||
specPattern: "**/*.feature", | ||
baseUrl: "http://localhost:3000/", | ||
|
||
async setupNodeEvents( | ||
on: Cypress.PluginEvents, | ||
config: Cypress.PluginConfigOptions | ||
): Promise<Cypress.PluginConfigOptions> { | ||
await addCucumberPreprocessorPlugin(on, config); | ||
on( | ||
"file:preprocessor", | ||
createBundler({ | ||
plugins: [createEsbuildPlugin(config)], | ||
}) | ||
); | ||
return config; | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const cucumber = require("cypress-cucumber-preprocessor").default; | ||
|
||
module.exports = (on, config) => { | ||
on("file:preprocessor", cucumber()); | ||
}; |
Oops, something went wrong.