Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test visibility] Fix cucumber e2e tests #4654

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion integration-tests/cucumber/cucumber.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const {
} = require('../../packages/dd-trace/src/plugins/util/test')

const isOldNode = semver.satisfies(process.version, '<=16')
const versions = ['7.0.0', isOldNode ? '9' : 'latest']
// TODO: change 10 to `latest` when fix is released
const versions = ['7.0.0', isOldNode ? '9' : '10']

const moduleType = [
{
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/selenium/selenium.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const {
} = require('../../packages/dd-trace/src/plugins/util/test')
const { NODE_MAJOR } = require('../../version')

const cucumberVersion = NODE_MAJOR <= 16 ? '9' : 'latest'
const cucumberVersion = NODE_MAJOR <= 16 ? '9' : '10'

const webAppServer = require('../ci-visibility/web-app-server')

Expand Down
6 changes: 3 additions & 3 deletions packages/datadog-instrumentations/src/cucumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ addHook({
// Test start / finish for newer versions. The only hook executed in workers when in parallel mode
addHook({
name: '@cucumber/cucumber',
versions: ['>=7.3.0'],
versions: ['>=7.3.0 <11.0.0'],
file: 'lib/runtime/test_case_runner.js'
}, testCaseHook)

Expand All @@ -559,7 +559,7 @@ addHook({
// `getWrappedRunTest` generates suite start and finish events
addHook({
name: '@cucumber/cucumber',
versions: ['>=7.3.0'],
versions: ['>=7.3.0 <11.0.0'],
file: 'lib/runtime/index.js'
}, (runtimePackage, frameworkVersion) => {
shimmer.wrap(runtimePackage.default.prototype, 'runTestCase', runTestCase => getWrappedRunTest(runTestCase))
Expand Down Expand Up @@ -588,7 +588,7 @@ addHook({
// `getWrappedParseWorkerMessage` generates suite finish events
addHook({
name: '@cucumber/cucumber',
versions: ['>=8.0.0'],
versions: ['>=8.0.0 <11.0.0'],
file: 'lib/runtime/parallel/coordinator.js'
}, (coordinatorPackage, frameworkVersion) => {
shimmer.wrap(coordinatorPackage.default.prototype, 'start', start => getWrappedStart(start, frameworkVersion, true))
Expand Down
Loading