- docker & docker compose
- tmux (installation instructions)
- overmind (installed automatically via bundler)
Spin up containers and the app, and then set up the application and solid-* databases:
docker compose up -d
bin/rails db:prepare
bin/dev
Then browse to http://localhost:3000 to see the running application.
- Add a
debugger
statement in the code. - Connect to the process (for example,
bin/overmind connect web
).
See overmind documentation for more about how to control processes.
accessionWF steps can be completed with:
bin/rake "development:accession[druid:dh414dd1590]"
By default, system tests will use headless Chrome, which supports javascript.
If your test doesn't use javascript, consider using Rack, as it is much faster:
RSpec.describe 'Create a work draft', :rack_test do
Cyperful is a visual debugger for system tests. To run a system test, prepend CYPERFUL=1
. For example:
CYPERFUL=1 bundle exec rspec spec/system/create_work_draft_spec.rb
- Add the field to the appropriate form object (e.g.,
app/forms/work_form.rb
), including validation. - Add the field to the form view (e.g.,
app/views/works/form.html.erb
), including adding strings toconfig/locales/en.yml
. - Permit the parameters in
app/controllers/works_controller
. - Map the field from cocina to work form in
app/services/to_work_form/mapper.rb
. - Map the field from work form to cocina in
app/services/to_cocina/mapper.rb
(or sub-mapper). - Add the field to the work form and cocina fixtures in
spec/support/mapping_fixtures.rb
. - Test serialization of the field in
spec/serializers/work_form_serializer_spec.rb
. - Test adding the field in
spec/system/create_work_deposit_spec.rb
. - Test editing the field in
spec/system/edit_work_spec.rb
. - Add the field to the work show (
app/views/works/show.html.erb
). - Test display of the field in
spec/system/show_work_spec.rb
.