a11y-todos

Expand History Expand History
Collapse History Collapse History

Mark Tasks as completed

Visit the application’s root, then select the Task records to act on.

As an initial feature, marking a Task as “complete” submits an “Event” to the CompletionsController so that it can mark the selected Task records’ completed_at timestamp to “now”.

Testing

Without the configuration changes, the error is unclear:

Error:
TasksTest#test_marks_multiple_Tasks_as_complete:
Capybara::ElementNotFound: Unable to find link or button "<span class=\"translation_missing\" title=\"translation missing: en.helpers.submit.completion.create\">Create</span>"
    test/system/tasks_test.rb:12:in `block in <class:TasksTest>'

rails test test/system/tasks_test.rb:6

After configuring raise_on_missing_translations = true, the error is more clear:

Error:
TasksTest#test_marks_multiple_Tasks_as_complete:
I18n::MissingTranslationData: translation missing: en.helpers.submit.completion.create
    test/system/tasks_test.rb:16:in `submit'
    test/system/tasks_test.rb:12:in `block in <class:TasksTest>'

rails test test/system/tasks_test.rb:6