diff --git a/spec/features/add_attribute.rb b/spec/features/add_attribute.rb new file mode 100644 index 0000000..74b58d4 --- /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 diff --git a/spec/features/search_theme.rb b/spec/features/search_theme.rb new file mode 100644 index 0000000..82a7b6e --- /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