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

Skip Starting Recording Container When Recording Mode is Set to SKIP #118

Merged
merged 2 commits into from
Dec 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,11 @@ class WebDriverContainerHolder {
}

currentConfiguration = specConfiguration
currentContainer = new BrowserWebDriverContainer()
if (grailsGebSettings.recordingEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you always start the recording container

Copy link
Contributor Author

@matrei matrei Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbglasius If grailsGebSettings.recordingMode is set to SKIP, grailsGebSettings.isRecordingEnabled() will return false and the recordingMode on the currentContainer will not be changed. The default BrowserWebDriverContainer.recordingMode is RECORD_FAILING.

With this change, if the grailsGebSettings.recordingMode is SKIP, the BrowserWebDriverContainer.recordingMode will also be SKIP

currentContainer = currentContainer.withRecordingMode(
grailsGebSettings.recordingMode,
grailsGebSettings.recordingDirectory,
grailsGebSettings.recordingFormat
)
}
currentContainer = new BrowserWebDriverContainer().withRecordingMode(
grailsGebSettings.recordingMode,
grailsGebSettings.recordingDirectory,
grailsGebSettings.recordingFormat
)
currentContainer.tap {
withAccessToHost(true)
start()
Expand Down
Loading