Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Feature: Export Form Definitions as CSV
- Background:
- Given form definition "Form 1" with:
- | locked_at | 2025-04-02T10:00:00 |
- | locked_configuration_id | b9bff254-4877-4c3c-b813-bbf2645c547e |
- And form definition "Form 2" with:
- | locked_at | 2025-04-02T11:00:00 |
- | locked_configuration_id | d959e932-20db-4f9c-9521-65cba31d2bf4 |
- Scenario: Export form definitions as csv
- When I sign in as a user with all permissions
- And I browse to form_definitions list
- Then I see "Form 1"
- And I see "Form 2"
- When I click "CSV"
- Then I download a CSV with content:
- | Id | Name | Current configuration | Locked configuration | Locked at | Created at | Updated at |
- | <UUID> | Form 1 | <UUID> | <UUID> | <ISO_DATE> | <ISO_DATE> | <ISO_DATE> |
- | <UUID> | Form 2 | <UUID> | <UUID> | <ISO_DATE> | <ISO_DATE> | <ISO_DATE> |
- csv do
- column :id
- column(:name) { |fd| fd.object.name }
- column :current_configuration_id
- column :locked_configuration_id
- column :locked_at
- column :created_at
- column :updated_at
- end
- when "<UUID>" then match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement