Does anyone know how to claim that a checkbox or input is disabled? I cannot find anything to indicate that this is supported. I am writing cucumber tests with webrat and test / unit.
I would like to take a step capable of assert_disabled: some_checkbox || assert_disabled: some_input.
Or somehow I can check the checkbox property.
Then /^the "([^\"]*)" field should be disabled$/ do |label| field_labeled(label).should be_disabled end
should do it for you.
This probably won't help you with Webrat and Test / Unit, but for people using Capybara, you can use
Then /^the "([^\"]+)" field should be disabled$/ do |field| find_field(field)[:disabled].should == 'disabled' end
:
Then /^the "([^\"]*)" field should be disabled$/ do |label| field_labeled(label)['disabled'].should == true end
, field_with_id.
field_with_id(label).should be_disabled
Source: https://habr.com/ru/post/1728127/More articles:SQL Server 2008 Express - loading a sample database? - sql-serverPayPal $ 0 Dollar Transaction? - transactionsBackground Music J2ME - javaMax for Live vs JVAP Tools - javaWhat event is canceled, and how does it differ from the finishing touches - iosThe cron command runs a php script every 10 minutes - cronWPF Documentviewerbase.Print. Удалить диалоговое окно - wpfhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1728130/how-to-use-repo-as-repository-on-hudson&usg=ALkJrhj9EyZor7TVV3rL1lmGxdW4uoNG-gdo things with smarty function return value? - javascriptinsert new element into array inside hash - ruby-on-railsAll Articles