diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-19 08:42:52 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-19 08:42:52 +0000 |
commit | 2c49c1af660a8e69446be442df81f9beaf0cf168 (patch) | |
tree | e2ec8f45786eda6a6b101bcbade7f665466f96d9 /spec | |
parent | 4f77a3f81e71643bc817b6f2b6003e2f322637aa (diff) | |
parent | 14d47884dff6844625c2e65b247fd773d78f5ea2 (diff) | |
download | gitlab-ce-2c49c1af660a8e69446be442df81f9beaf0cf168.tar.gz |
Merge branch 'dockerfile-templates' into 'master'
Allow to use Dockerfile templates
See merge request !7247
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/files/dockerfile_dropdown_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/projects/files/dockerfile_dropdown_spec.rb b/spec/features/projects/files/dockerfile_dropdown_spec.rb new file mode 100644 index 00000000000..32f33a3ca97 --- /dev/null +++ b/spec/features/projects/files/dockerfile_dropdown_spec.rb @@ -0,0 +1,30 @@ +require 'spec_helper' + +feature 'User wants to add a Dockerfile file', feature: true do + include WaitForAjax + + before do + user = create(:user) + project = create(:project) + project.team << [user, :master] + login_as user + visit namespace_project_new_blob_path(project.namespace, project, 'master', file_name: 'Dockerfile') + end + + scenario 'user can see Dockerfile dropdown' do + expect(page).to have_css('.dockerfile-selector') + end + + scenario 'user can pick a Dockerfile file from the dropdown', js: true do + find('.js-dockerfile-selector').click + wait_for_ajax + within '.dockerfile-selector' do + find('.dropdown-input-field').set('HTTPd') + find('.dropdown-content li', text: 'HTTPd').click + end + wait_for_ajax + + expect(page).to have_css('.dockerfile-selector .dropdown-toggle-text', text: 'HTTPd') + expect(page).to have_content('COPY ./ /usr/local/apache2/htdocs/') + end +end |