Sha256: d4498f7bea1868d2c303a9a0d3e19e7b05524ddc63038e5ddeac88ab11926076

Contents?: true

Size: 830 Bytes

Versions: 17

Compression:

Stored size: 830 Bytes

Contents

class ModalPage
  include Druid

  button(:launch_modal, :id => 'launch_modal_button')
end

class ModalDialog
  include Druid

  button(:close_window, :id => 'close_window')
  button(:close_window_with_delay, :id => 'delayed_close')
  button(:launch_another_modal, :id => 'launch_modal_button')
end

class AnotherModalDialog
  include Druid

  button(:close_window, :id => 'close_window')
  button(:close_window_with_delay, :id => 'delayed_close')
end

Given(/^I am on the modal page$/) do
  @page = ModalPage.new(@driver)
  @page.navigate_to(UrlHelper.modal)
end

When(/^I open a modal dialog$/) do
  @page.modal_dialog do
    @page.launch_modal
  end
end

Then(/^I should be able to close the modal$/) do
  @dialog = ModalDialog.new(@driver)
  @dialog.attach_to_window(:title => 'Modal 1') do
    @dialog.close_window
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
druid-s-1.0.0 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.6 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.5 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.4 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.3 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.2 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.1 features/step_definations/modal_dialog_steps.rb
druid-ts-1.2.0 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.8 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.7 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.6 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.5 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.4 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.3 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.2 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.1 features/step_definations/modal_dialog_steps.rb
druid-ts-1.1.0 features/step_definations/modal_dialog_steps.rb