require "application_system_test_case"

class ExclusiveTraditionalRecordsTest < ApplicationSystemTestCase
  setup do
    @exclusive_traditional_record = exclusive_traditional_records(:one)
  end

  test "visiting the index" do
    visit exclusive_traditional_records_url
    assert_selector "h1", text: "Exclusive traditional records"
  end

  test "should create exclusive traditional record" do
    visit exclusive_traditional_records_url
    click_on "New exclusive traditional record"

    fill_in "Author", with: @exclusive_traditional_record.author
    fill_in "Description", with: @exclusive_traditional_record.description
    fill_in "Name", with: @exclusive_traditional_record.name
    click_on "Create Exclusive traditional record"

    assert_text "Exclusive traditional record was successfully created"
    click_on "Back"
  end

  test "should update Exclusive traditional record" do
    visit exclusive_traditional_record_url(@exclusive_traditional_record)
    click_on "Edit this exclusive traditional record", match: :first

    fill_in "Author", with: @exclusive_traditional_record.author
    fill_in "Description", with: @exclusive_traditional_record.description
    fill_in "Name", with: @exclusive_traditional_record.name
    click_on "Update Exclusive traditional record"

    assert_text "Exclusive traditional record was successfully updated"
    click_on "Back"
  end

  test "should destroy Exclusive traditional record" do
    visit exclusive_traditional_record_url(@exclusive_traditional_record)
    click_on "Destroy this exclusive traditional record", match: :first

    assert_text "Exclusive traditional record was successfully destroyed"
  end
end
