Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7a22a618
Commit
7a22a618
authored
Nov 09, 2021
by
Nicolò Maria Mezzopera
Committed by
Stan Hu
Nov 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase Capybara screenshots filenames length
parent
dd2554bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
spec/support/capybara.rb
spec/support/capybara.rb
+3
-1
No files found.
spec/support/capybara.rb
View file @
7a22a618
...
@@ -28,6 +28,8 @@ JS_CONSOLE_FILTER = Regexp.union([
...
@@ -28,6 +28,8 @@ JS_CONSOLE_FILTER = Regexp.union([
CAPYBARA_WINDOW_SIZE
=
[
1366
,
768
].
freeze
CAPYBARA_WINDOW_SIZE
=
[
1366
,
768
].
freeze
SCREENSHOT_FILENAME_LENGTH
=
ENV
[
'CI'
]
||
ENV
[
'CI_SERVER'
]
?
255
:
99
# Run Workhorse on the given host and port, proxying to Puma on a UNIX socket,
# Run Workhorse on the given host and port, proxying to Puma on a UNIX socket,
# for a closer-to-production experience
# for a closer-to-production experience
Capybara
.
register_server
:puma_via_workhorse
do
|
app
,
port
,
host
,
**
options
|
Capybara
.
register_server
:puma_via_workhorse
do
|
app
,
port
,
host
,
**
options
|
...
@@ -113,7 +115,7 @@ Capybara.enable_aria_label = true
...
@@ -113,7 +115,7 @@ Capybara.enable_aria_label = true
Capybara
::
Screenshot
.
append_timestamp
=
false
Capybara
::
Screenshot
.
append_timestamp
=
false
Capybara
::
Screenshot
.
register_filename_prefix_formatter
(
:rspec
)
do
|
example
|
Capybara
::
Screenshot
.
register_filename_prefix_formatter
(
:rspec
)
do
|
example
|
example
.
full_description
.
downcase
.
parameterize
(
separator:
"_"
)[
0
..
99
]
example
.
full_description
.
downcase
.
parameterize
(
separator:
"_"
)[
0
..
SCREENSHOT_FILENAME_LENGTH
]
end
end
# Keep only the screenshots generated from the last failing test suite
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment