Project

General

Profile

Patch #39109 ยป 0001-Use-capybara-assertion.patch

patch for r22317 - Takashi Kato, 2023-09-24 17:37

View differences:

test/system/issues_test.rb
443 443
    # wait for ajax response
444 444
    assert page.has_select?('issue_project_id', selected: 'OnlineStore')
445 445

  
446
    assert_selector 'input[type=submit]', count: 2
446 447
    submit_buttons = page.all('input[type=submit]')
447
    assert_equal 2, submit_buttons.size
448 448
    assert_equal 'Move', submit_buttons[0].value
449 449
    assert_equal 'Move and follow', submit_buttons[1].value
450 450

  
......
507 507
    # wait for ajax response
508 508
    assert page.has_select?('issue_project_id', selected: 'OnlineStore')
509 509

  
510
    assert_selector 'input[type=submit]', count: 2
510 511
    submit_buttons = page.all('input[type=submit]')
511
    assert_equal 2, submit_buttons.size
512

  
512 513
    assert_equal 'Copy', submit_buttons[0].value
513 514
    assert_equal 'Copy and follow', submit_buttons[1].value
514 515
    page.find('#issue_priority_id').select('High')
......
645 646
    wait_for_ajax
646 647

  
647 648
    # assert log time form does not exist anymore for user without required permissions on the new project
648
    assert_not page.has_css?('#log_time')
649
    assert page.has_no_css?('#log_time')
649 650
  end
650 651

  
651 652
  def test_update_issue_form_should_include_add_notes_form_only_for_users_with_permission
......
665 666
    wait_for_ajax
666 667

  
667 668
    # assert add notes form does not exist anymore for user without required permissions on the new project
668
    assert_not page.has_css?('#add_notes')
669
    assert page.has_no_css?('#add_notes')
669 670
  end
670 671
end
test/system/timelog_test.rb
43 43
    end
44 44
    within 'select#time_entry_activity_id' do
45 45
      assert has_content?('Development')
46
      assert !has_content?('Design')
46
      assert has_no_content?('Design')
47 47
    end
48 48
  end
49 49

  
......
69 69
    fill_in 'Hours', :with => '7'
70 70
    page.first(:button, 'Submit').click
71 71

  
72
    assert_equal "/projects/ecookbook/time_entries", current_path
72
    assert_current_path "/projects/ecookbook/time_entries"
73 73
    entries = TimeEntry.where(:id => [1,2,3]).to_a
74 74
    assert entries.all? {|entry| entry.hours == 7.0}
75 75
  end
    (1-1/1)