From 9a158473c117a23c41a8fd05b167a79e3d045129 Mon Sep 17 00:00:00 2001 From: "L.Tosi et J.P. Cahier" Date: Mon, 19 May 2014 17:46:58 +0200 Subject: [PATCH 1/3] TEST: Create a viewpoint (#22). --- spec/features/viewpoint_creation.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spec/features/viewpoint_creation.rb diff --git a/spec/features/viewpoint_creation.rb b/spec/features/viewpoint_creation.rb new file mode 100644 index 0000000..b1d59b2 --- /dev/null +++ b/spec/features/viewpoint_creation.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +feature 'Create a viewpoint' do + + $a_viewpoint = a_string() + + background do + visit'/' + click_on 'Se connecter' + fill_in 'Nom d\'utilisateur :', :with => 'donald' + fill_in 'Mot de passe', :with => 'duck' + click_on 'Se connecter' + end + + feature 'for any viewpoint' + toggle_edit() + click_on add_button('points de vue') + click_on 'Sans nom' + fill_in 'textbox', :with => $a_viewpoint + type_enter() + toggle_edit() + page.should have_content $a_viewpoint + end + +end \ No newline at end of file From dcda066a870bbe5c5bfbc183298b97be52aa388a Mon Sep 17 00:00:00 2001 From: "L.Tosi et J.P.Cahier" Date: Mon, 19 May 2014 17:50:08 +0200 Subject: [PATCH 2/3] TEST: Delete a viewpoint (#30). --- spec/features/viewpoint_deletion.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 spec/features/viewpoint_deletion.rb diff --git a/spec/features/viewpoint_deletion.rb b/spec/features/viewpoint_deletion.rb new file mode 100644 index 0000000..4d8f55d --- /dev/null +++ b/spec/features/viewpoint_deletion.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +feature 'Delete a viewpoint' do + + $a_vpt = a_string() + + background do + visit'/' + click_on 'Se connecter' + fill_in 'Nom d\'utilisateur :', :with => 'donald' + fill_in 'Mot de passe', :with => 'duck' + click_on 'Se connecter' + toggle_edit() + click_on add_button('points de vue') + click_on 'Sans nom' + fill_in 'textbox', :with => $a_vpt + type_enter() + toggle_edit() + end + + feature 'for any empty viewpoint' + toggle_edit() + click_on garbage_button($a_vpt) + toggle_edit() + page.should have_content 'Points de' + page.should_not have_content $a_vpt + end + +end \ No newline at end of file From 19a5f1fb7b72db7e604f5ec51776c64c1aa09eac Mon Sep 17 00:00:00 2001 From: "L.Tosi et J.P.Cahier" Date: Mon, 19 May 2014 17:52:19 +0200 Subject: [PATCH 3/3] TEST: Attribute values should be easily modified(#3). --- spec/features/modify-attribute-values.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 spec/features/modify-attribute-values.rb diff --git a/spec/features/modify-attribute-values.rb b/spec/features/modify-attribute-values.rb new file mode 100644 index 0000000..a3695ab --- /dev/null +++ b/spec/features/modify-attribute-values.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + + +feature 'Attribute values should be easily modified' do + + scenario 'for an attribute already created' do + visit '/' + click_on 'Se connecter' + fill_in 'Nom d\'utilisateur :', :with => 'donald' + fill_in 'Mot de passe', :with => 'duck' + click_on 'Se connecter' + click_on 'Corpus-mesures' + click_on 'item-phys' + click_on 'OFF' + click_on 'poids 3kg' + fill_in 'Valeur', :with => '5,5kg' + click_on 'Enregistrer' + click_on 'ON' + page.should have_content '5,5kg' + end +end + \ No newline at end of file