Sha256: e148c5e5b6c48a4d5fc7c3da8401da8d9b05b8c129647b32ce5035ffa3ba3b7c

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

Then /^Netzke should be initialized$/ do
  Netzke::Base.should be
end

When /^I execute "([^\"]*)"$/ do |script|
  page.driver.browser.execute_script(script)
end

Then /^button "([^"]*)" should be disabled$/ do |arg1|
  Netzke.should be # PENDING!
end

When /I (?:sleep|wait) (\d+) (\w+)/ do |amount, unit|
  sleep amount.to_i.send(unit)
end

When /^I wait for the response from the server$/ do
  sleep 0.5
  page.wait_until{ page.driver.browser.execute_script("return !(Netzke.ajaxIsLoading() || Ext.Ajax.isLoading())") }
  sleep 0.5
end

When /^I go forward one page$/ do
  page.driver.browser.execute_script(<<-JS)
    var toolbar = Ext.ComponentQuery.query('pagingtoolbar')[0];
    toolbar.moveNext();
  JS
  page.wait_until{ page.driver.browser.execute_script("return !Ext.Ajax.isLoading();") }
end

Then /^the "([^"]*)" component should be hidden$/ do |id|
  page.driver.browser.execute_script(<<-JS).should be_false
    var cmp = Ext.ComponentMgr.get("#{id}");
    return cmp.isVisible();
  JS
end

Then /^I should see "([^"]*)" within paging toolbar$/ do |text|
  step %Q{I should see "#{text}"}
  # Not working, as it checks the initial text property, not the actual one
  # page.driver.browser.execute_script(<<-JS).should == true
  #   Ext.ComponentQuery.query('pagingtoolbar')[0].query('tbtext[text="#{text}"]').length >= 1
  # JS
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
netzke-basepack-0.7.7 test/basepack_test_app/features/step_definitions/generic_steps.rb
netzke-basepack-zh-0.7.6 test/basepack_test_app/features/step_definitions/generic_steps.rb