Sha256: c078d893bece9e157ce3367f1bf1f04a523560e3319893dbaf75dd717acc74f7

Contents?: true

Size: 936 Bytes

Versions: 19

Compression:

Stored size: 936 Bytes

Contents

When /^I set the font size to (\d+|maximum|minimum)$/ do |arg1|
  if arg1 =~ /\d+/
    size = arg1.to_i
  elsif arg1 == 'maximum'
    size = Redcar::EditView::MAX_FONT_SIZE
  else
    size = Redcar::EditView::MIN_FONT_SIZE
  end
  Given "I would type \"#{size}\" in an input box"
  When "I set the font size"
end

When /^I (de|in)crease the font size$/ do |direction|
  Swt.sync_exec do
    if direction == 'in'
      Redcar::Top::IncreaseFontSize.new.run
    else
      Redcar::Top::DecreaseFontSize.new.run
    end
  end
end

When /^I set the font size$/ do
  Swt.sync_exec do
    Redcar::Top::SelectFontSize.new.run
  end
end

Then /^the font size should be (\d+|maximum|minimum)$/ do |size|
  current = Redcar::EditView.font_size
  if size =~ /\d+/
    current.should == size.to_i
  elsif size == 'maximum'
    current.should == Redcar::EditView::MAX_FONT_SIZE
  else
    current.should == Redcar::EditView::MIN_FONT_SIZE
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
redcar-0.13 plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.13.5dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.13.4dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.13.3dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.13.2dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.13.1dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-0.12.1 plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.13.0dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-0.12 plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.27dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.26dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.25dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.24dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.23dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.22dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.21dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.20dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.19dev plugins/redcar/features/step_definitions/font_steps.rb
redcar-dev-0.12.18dev plugins/redcar/features/step_definitions/font_steps.rb