End of day commit
This commit is contained in:
@@ -124,7 +124,7 @@ step "the supplier table should have been linked to the first section" do
|
||||
end
|
||||
|
||||
step "the supplier clicks on the table having the new list in the section view" do
|
||||
page.find(".section-table-#{@table.id}").click
|
||||
js_click ".section-table-#{@table.id}"
|
||||
end
|
||||
|
||||
step "the supplier table actions of the new list should be visible" do
|
||||
|
||||
@@ -3,8 +3,8 @@ step "I provide a new supplier email address" do
|
||||
end
|
||||
|
||||
step "the supplier submits the supplier settings form" do
|
||||
find('.submit-supplier-settings').click
|
||||
sleep 1.5 # give application some time
|
||||
js_click '.submit-supplier-settings'
|
||||
#sleep 1.5 # give application some time
|
||||
end
|
||||
|
||||
step "the supplier email should not have been changed" do
|
||||
|
||||
@@ -4,7 +4,7 @@ step "there is another table" do
|
||||
end
|
||||
|
||||
step "the user should see a popup asking the user if he would like to change table" do
|
||||
move_table_body = page.evaluate_script "t('move_table.confirmation_body')"
|
||||
move_table_body = page.evaluate_script "t('move_table.confirmation_body', #{@other_table.attributes.to_json})"
|
||||
move_table_body.should be_present
|
||||
page.should have_content move_table_body
|
||||
end
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe User do
|
||||
let(:user){ build :user }
|
||||
let(:user_params){ {} }
|
||||
let(:user){ build :user, user_params }
|
||||
describe '#supplier_name' do
|
||||
it "displays the auth data name if available" do
|
||||
user.auth_data = {'info' => {'name' => 'Benji setup'}}
|
||||
@@ -19,8 +20,12 @@ describe User do
|
||||
user.friends_name.should == 'Benji'
|
||||
end
|
||||
|
||||
it 'falls back to unkown if not present' do
|
||||
it 'falls back to empty if not present' do
|
||||
user.friends_name.should == ''
|
||||
end
|
||||
it 'falls back to persisted property name if not present through auth data' do
|
||||
user_params[:name] = "Joe"
|
||||
user.friends_name.should == 'Joe'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,6 +65,16 @@ module SpecEmberHelpers
|
||||
def js_click(selector)
|
||||
find selector
|
||||
page.execute_script "$('#{selector}').click()"
|
||||
|
||||
# Wait for jQuery activity to finish
|
||||
wait_cycles = 0
|
||||
active_count = page.evaluate_script '$.active'
|
||||
while active_count > 0 and wait_cycles < 30
|
||||
sleep 0.1
|
||||
active_count = page.evaluate_script '$.active'
|
||||
wait_cycles += 1
|
||||
end
|
||||
raise "There are still active jQuery tasks" if active_count > 0
|
||||
end
|
||||
|
||||
def js_text(selector)
|
||||
|
||||
Reference in New Issue
Block a user