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
38205f79
Commit
38205f79
authored
Jan 21, 2022
by
Jacques
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix file browser rspecs
Fixed the rspecs with the blob refactor FF enabled
parent
15991b84
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+16
-11
No files found.
spec/features/projects/files/user_browses_files_spec.rb
View file @
38205f79
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
"spec_helper"
require
"spec_helper"
RSpec
.
describe
"User browses files"
do
RSpec
.
describe
"User browses files"
,
:js
do
include
RepoHelpers
include
RepoHelpers
let
(
:fork_message
)
do
let
(
:fork_message
)
do
...
@@ -340,32 +340,37 @@ RSpec.describe "User browses files" do
...
@@ -340,32 +340,37 @@ RSpec.describe "User browses files" do
let
(
:newrev
)
{
project
.
repository
.
commit
(
'master'
).
sha
}
let
(
:newrev
)
{
project
.
repository
.
commit
(
'master'
).
sha
}
before
do
before
do
stub_feature_flags
(
refactor_blob_viewer:
false
)
# This stub will be removed in https://gitlab.com/gitlab-org/gitlab/-/issues/350456
create_file_in_repo
(
project
,
'master'
,
'master'
,
filename
,
'Test file'
)
create_file_in_repo
(
project
,
'master'
,
'master'
,
filename
,
'Test file'
)
path
=
File
.
join
(
'master'
,
filename
)
path
=
File
.
join
(
'master'
,
filename
)
visit
(
project_blob_path
(
project
,
path
))
visit
(
project_blob_path
(
project
,
path
))
wait_for_requests
end
end
it
"shows
a raw file content
"
do
it
"shows
raw file content in a new tab
"
do
click_link
(
"Open raw"
)
new_tab
=
window_opened_by
{
click_link
'Open raw'
}
expect
(
source
).
to
eq
(
""
)
# Body is filled in by gitlab-workhorse
within_window
new_tab
do
expect
(
page
).
to
have_content
(
"Test file"
)
end
end
end
end
end
context
"when browsing a raw file"
do
context
"when browsing a raw file"
do
before
do
before
do
stub_feature_flags
(
refactor_blob_viewer:
false
)
# This stub will be removed in https://gitlab.com/gitlab-org/gitlab/-/issues/350456
visit
(
tree_path_root_ref
)
path
=
File
.
join
(
RepoHelpers
.
sample_commit
.
id
,
RepoHelpers
.
sample_blob
.
path
)
wait_for_requests
visit
(
project_blob_path
(
project
,
path
))
click_link
(
".gitignore"
)
wait_for_requests
end
end
it
"shows
a raw file content
"
do
it
"shows
raw file content in a new tab
"
do
click_link
(
"Open raw"
)
new_tab
=
window_opened_by
{
click_link
'Open raw'
}
expect
(
source
).
to
eq
(
""
)
# Body is filled in by gitlab-workhorse
within_window
new_tab
do
expect
(
page
).
to
have_content
(
"*.rbc"
)
end
end
end
end
end
end
end
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