{"id":13880035,"url":"https://github.com/mojotech/capybara-ui","last_synced_at":"2025-08-23T04:12:15.272Z","repository":{"id":8158257,"uuid":"9579367","full_name":"mojotech/capybara-ui","owner":"mojotech","description":"Roles and page objects for Capybara integration testing - Formerly called Dill","archived":false,"fork":false,"pushed_at":"2021-03-18T14:11:52.000Z","size":704,"stargazers_count":28,"open_issues_count":16,"forks_count":3,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-08-09T20:17:49.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mojotech.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-21T12:54:56.000Z","updated_at":"2024-11-04T17:28:07.000Z","dependencies_parsed_at":"2022-09-13T11:01:04.809Z","dependency_job_id":null,"html_url":"https://github.com/mojotech/capybara-ui","commit_stats":null,"previous_names":["mojotech/cucumber-salad","mojotech/dill"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mojotech/capybara-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojotech%2Fcapybara-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojotech%2Fcapybara-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojotech%2Fcapybara-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojotech%2Fcapybara-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mojotech","download_url":"https://codeload.github.com/mojotech/capybara-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mojotech%2Fcapybara-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740730,"owners_count":24812642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:02:44.496Z","updated_at":"2025-08-23T04:12:15.249Z","avatar_url":"https://github.com/mojotech.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Capybara-UI\n[![Code Climate](https://codeclimate.com/github/mojotech/capybara-ui/badges/gpa.svg)](https://codeclimate.com/github/mojotech/capybara-ui)\n[![Test Coverage](https://codeclimate.com/github/mojotech/capybara-ui/badges/coverage.svg)](https://codeclimate.com/github/mojotech/capybara-ui)\n\nDocs [here](/docs/table_of_contents.md). Check out the [wiki](https://github.com/mojotech/capybara-ui/wiki) for more ideas and tips.\n\n# Overview\nCapybara-UI (formerly called Dill) is a [Capybara](https://github.com/jnicklas/capybara) abstraction that makes it easy to define reuseable DOM \"widgets\", aka [page objects](http://www.assertselenium.com/automation-design-practices/page-object-pattern/), and introduces the concept of \"roles\" to allow you to easily organize your testing methods and widgets. Capybara-UI also introduces some helpers and syntactic sugar to make your testing even easier.\n\n### Before Capybara-UI\n```ruby\nfeature 'Admin new user page' do\n  it 'should be able to create a new user' do\n    visit('/users/new')\n\n    within(:css, \"#new_user\") do\n      fill_in('Name', :with =\u003e 'Example Name')\n      fill_in('Password', :with =\u003e 'Password')\n      select('Blue', :from =\u003e 'Favorite Color')\n      click_button('Submit')\n    end\n\n    within(:css, '.alert-success') do\n      expect(page).to have_content('Example Name')\n    end\n  end\nend\n```\n\n### After Capybara-UI\n```ruby\nfeature 'Admin new user page' do\n  let(:role) { roles.admin }\n\n  it 'should be able to create a new user' do\n    role.navigate_to_new_user\n    role.create_user(name: 'Example Name', password: 'Password', color: 'Blue')\n\n    expect(role).to see :successfully_created_user, 'Example Name'\n  end\nend\n```\n\nFor a more in depth tour of Capybara-UI, read the [Capybara-UI walkthrough](/docs/walkthrough.md). You can also get more ideas and tips from the [wiki](https://github.com/mojotech/capybara-ui/wiki).\n\n\n## Install\nAdd the following line to your gemfile\n\n```ruby\ngem 'capybara-ui'\n```\n\nIf using with Cucumber, add the following to your `support/env.rb`.\n\n```ruby\nrequire 'capybara/ui/cucumber'\n```\n\nIf you are using with RSpec, add the following to your `spec_helper.rb` or\n`support/env.rb` file.\n\n```ruby\nrequire 'capybara/ui/rspec'\n```\n\n## Contributing\nWe welcome pull requests. Please make sure tests accompany any PRs.\n\n\n---\n\nCurated by the good people at MojoTech.\n\n\u003ca href=\"http://mojotech.com\"\u003e\u003cimg width=\"140px\" src=\"https://mojotech.github.io/sass2stylus/img/mojotech-logo.svg\" title=\"MojoTech's Hiring\"\u003e\u003c/a\u003e \u003csup\u003e(psst, [we're hiring](http://www.mojotech.com/jobs))\u003c/sup\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojotech%2Fcapybara-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmojotech%2Fcapybara-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmojotech%2Fcapybara-ui/lists"}