From ce9c87b06fa7b0e99f76995012ad3e45284e0e48 Mon Sep 17 00:00:00 2001 From: Quentin Pierre Date: Tue, 19 Apr 2016 21:32:26 +0200 Subject: [PATCH 1/4] Create search_theme.rb --- spec/features/search_theme.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spec/features/search_theme.rb diff --git a/spec/features/search_theme.rb b/spec/features/search_theme.rb new file mode 100644 index 0000000..a391fcd --- /dev/null +++ b/spec/features/search_theme.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +feature 'chercher un theme' do + + scenario 'par arborescence' do + visit $home_page + click_on 'Rechercher par thème' + click_on 'Arborescence' + click_on "Formation de l'UTT" + click_on "Sélectionner" + expect(page).to have_content('Thèmes') + end + + +end From 2b3e9ee129ae7f6e25d693bf767a5f361534b143 Mon Sep 17 00:00:00 2001 From: Quentin Pierre Date: Tue, 19 Apr 2016 21:37:11 +0200 Subject: [PATCH 2/4] Create add_attribute.rb --- spec/features/add_attribute.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 spec/features/add_attribute.rb diff --git a/spec/features/add_attribute.rb b/spec/features/add_attribute.rb new file mode 100644 index 0000000..dea3900 --- /dev/null +++ b/spec/features/add_attribute.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +feature 'AjouterAttribut' do + + given(:attribute_name) { a_string } + given(:attribute_value) { a_string } + + scenario 'à un item' do + visit $home_page + click_on 'Se connecter' + log_in_as 'alice', 'lapinblanc' + click_on 'Rechercher par thème' + click_on 'Nuage' + click_on 'Innovation' + click_on 'Sélectionner' + page.should have_content 'ITEMS' + click_on 'IF09 – Systèmes documentaires' + toggle_edit + click_plus_sign_next_to 'attribute' + fill_in 'Nom', :with => attribute_name + fill_in 'Valeur', :with => attribute_value + click_on 'Créer' + expect(page).to have_content(attribute_name) + expect(page).to have_content(attribute_value) + end + +end From 71ecac609a28232065cdfbc4903f4575bdb4b102 Mon Sep 17 00:00:00 2001 From: Quentin Pierre Date: Tue, 19 Apr 2016 21:40:02 +0200 Subject: [PATCH 3/4] Update add_attribute.rb --- spec/features/add_attribute.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/add_attribute.rb b/spec/features/add_attribute.rb index dea3900..74b58d4 100644 --- a/spec/features/add_attribute.rb +++ b/spec/features/add_attribute.rb @@ -20,8 +20,8 @@ fill_in 'Nom', :with => attribute_name fill_in 'Valeur', :with => attribute_value click_on 'Créer' - expect(page).to have_content(attribute_name) - expect(page).to have_content(attribute_value) + expect(page).to have_content(attribute_name) + expect(page).to have_content(attribute_value) end end From f8c39ae9d13a3f3dc7227f85920fd54a6571a0a7 Mon Sep 17 00:00:00 2001 From: Quentin Pierre Date: Tue, 19 Apr 2016 21:40:25 +0200 Subject: [PATCH 4/4] Update search_theme.rb --- spec/features/search_theme.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/features/search_theme.rb b/spec/features/search_theme.rb index a391fcd..82a7b6e 100644 --- a/spec/features/search_theme.rb +++ b/spec/features/search_theme.rb @@ -6,9 +6,9 @@ visit $home_page click_on 'Rechercher par thème' click_on 'Arborescence' - click_on "Formation de l'UTT" - click_on "Sélectionner" - expect(page).to have_content('Thèmes') + click_on "Formation de l'UTT" + click_on "Sélectionner" + expect(page).to have_content('Thèmes') end