diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 22:40:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 22:40:25 +0000 |
commit | 20abacca26d629e533c41e98600d903be8d13441 (patch) | |
tree | 7f879eefe36f0426f181b29cddbb9816e747d1e0 /spec | |
parent | 8bdbf220176b3c4df35dbf01da3dc8b2d507f351 (diff) | |
download | gitlab-ce-20abacca26d629e533c41e98600d903be8d13441.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/files/user_browses_files_spec.rb | 28 | ||||
-rw-r--r-- | spec/frontend/repository/router_spec.js | 17 |
2 files changed, 37 insertions, 8 deletions
diff --git a/spec/features/projects/files/user_browses_files_spec.rb b/spec/features/projects/files/user_browses_files_spec.rb index 5364bc10b2f..5c52abaeb62 100644 --- a/spec/features/projects/files/user_browses_files_spec.rb +++ b/spec/features/projects/files/user_browses_files_spec.rb @@ -180,6 +180,20 @@ describe "User browses files" do expect(page).to have_content("VERSION") .and have_content(".gitignore") .and have_content("LICENSE") + + click_link("files") + + page.within('.repo-breadcrumb') do + expect(page).to have_link('files') + end + + click_link("html") + + page.within('.repo-breadcrumb') do + expect(page).to have_link('html') + end + + expect(page).to have_link('500.html') end end @@ -193,6 +207,20 @@ describe "User browses files" do expect(page).to have_content("VERSION") .and have_content(".gitignore") .and have_content("LICENSE") + + click_link("files") + + page.within('.repo-breadcrumb') do + expect(page).to have_link('files') + end + + click_link("html") + + page.within('.repo-breadcrumb') do + expect(page).to have_link('html') + end + + expect(page).to have_link('500.html') end end diff --git a/spec/frontend/repository/router_spec.js b/spec/frontend/repository/router_spec.js index 8f3ac53c37a..6944b23558a 100644 --- a/spec/frontend/repository/router_spec.js +++ b/spec/frontend/repository/router_spec.js @@ -4,14 +4,15 @@ import createRouter from '~/repository/router'; describe('Repository router spec', () => { it.each` - path | component | componentName - ${'/'} | ${IndexPage} | ${'IndexPage'} - ${'/tree/master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/master'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/master/app/assets'} | ${TreePage} | ${'TreePage'} - ${'/-/tree/123/app/assets'} | ${null} | ${'null'} - `('sets component as $componentName for path "$path"', ({ path, component }) => { - const router = createRouter('', 'master'); + path | branch | component | componentName + ${'/'} | ${'master'} | ${IndexPage} | ${'IndexPage'} + ${'/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/master'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/master/app/assets'} | ${'master'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/feature/test-%23/app/assets'} | ${'feature/test-#'} | ${TreePage} | ${'TreePage'} + ${'/-/tree/123/app/assets'} | ${'master'} | ${null} | ${'null'} + `('sets component as $componentName for path "$path"', ({ path, component, branch }) => { + const router = createRouter('', branch); const componentsForRoute = router.getMatchedComponents(path); |