diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-05 08:34:50 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-05 08:34:50 +0000 |
commit | 65ea732cfebd7efe5a0ae9b31eef4349c38cfa4b (patch) | |
tree | f751470303e3fb60331d8559afd1a747efff8a51 /spec | |
parent | 20e6670a4779addff3244ee8713b6a6a8f969e4c (diff) | |
parent | 7d43484d2935d53fc81ad8bc0d9f7e57a69de692 (diff) | |
download | gitlab-ce-65ea732cfebd7efe5a0ae9b31eef4349c38cfa4b.tar.gz |
Merge branch 'fix_wiki_commit_message' into 'master'
Fix wiki commit message
Closes #20389
See merge request !10464
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/wiki/user_creates_wiki_page_spec.rb | 20 | ||||
-rw-r--r-- | spec/features/projects/wiki/user_updates_wiki_page_spec.rb | 6 |
2 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb index fff8b9f3447..7bdaafd1beb 100644 --- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb @@ -15,6 +15,10 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do let(:project) { create(:project, namespace: user.namespace) } context 'when wiki is empty' do + scenario 'commit message field has value "Create home"' do + expect(page).to have_field('wiki[message]', with: 'Create home') + end + scenario 'directly from the wiki home page' do fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Create page' @@ -37,6 +41,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do fill_in :new_wiki_path, with: 'foo' click_button 'Create Page' + # Commit message field should have correct value. + expect(page).to have_field('wiki[message]', with: 'Create foo') + fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Create page' @@ -51,6 +58,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do fill_in :new_wiki_path, with: 'Spaces in the name' click_button 'Create Page' + # Commit message field should have correct value. + expect(page).to have_field('wiki[message]', with: 'Create spaces in the name') + fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Create page' @@ -65,6 +75,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do fill_in :new_wiki_path, with: 'hyphens-in-the-name' click_button 'Create Page' + # Commit message field should have correct value. + expect(page).to have_field('wiki[message]', with: 'Create hyphens in the name') + fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Create page' @@ -80,6 +93,10 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do let(:project) { create(:project, namespace: create(:group, :public)) } context 'when wiki is empty' do + scenario 'commit message field has value "Create home"' do + expect(page).to have_field('wiki[message]', with: 'Create home') + end + scenario 'directly from the wiki home page' do fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Create page' @@ -101,6 +118,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do fill_in :new_wiki_path, with: 'foo' click_button 'Create Page' + # Commit message field should have correct value. + expect(page).to have_field('wiki[message]', with: 'Create foo') + fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Create page' diff --git a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb index aedc0333cb9..86cf520ea80 100644 --- a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb @@ -19,6 +19,9 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do scenario 'success when the wiki content is not empty' do click_link 'Edit' + # Commit message field should have correct value. + expect(page).to have_field('wiki[message]', with: 'Update home') + fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Save changes' @@ -48,6 +51,9 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do scenario 'the home page' do click_link 'Edit' + # Commit message field should have correct value. + expect(page).to have_field('wiki[message]', with: 'Update home') + fill_in :wiki_content, with: 'My awesome wiki!' click_button 'Save changes' |