README.md in capybara_active_admin-0.1.0 vs README.md in capybara_active_admin-0.2.0
- old
+ new
@@ -43,30 +43,38 @@
subject
expect(page).to have_action_item('New User')
expect(page).to_not have_action_item('Edit User')
- with_table_for('users') do
+ within_table_for('users') do
expect(page).to have_table_row(count: 2)
- expect(page).to have_table_col('John Doe')
- expect(page).to have_table_col('John Doe', row_id: john.id)
- expect(page).to have_table_col('John Doe', row_id: john.id, col_name: 'Full Name')
+ expect(page).to have_table_cell('John Doe')
- expect(page).to_not have_table_col('John Doe', row_id: john.id, col_name: 'Id')
- expect(page).to_not have_table_col('John Doe', row_id: jane.id)
- expect(page).to_not have_table_col('John Doe', row_id: jane.id, col_name: 'Full Name')
+ within_table_row(id: john.id) do
+ expect(page).to have_table_cell('John Doe', row_id: john.id)
+ expect(page).to have_table_cell('John Doe', row_id: john.id, col_name: 'Full Name')
+ expect(page).to_not have_table_cell('John Doe', row_id: john.id, col_name: 'Id')
+ end
+
+ within_table_row(id: jane.id) do
+ expect(page).to_not have_table_cell('John Doe')
+ expect(page).to_not have_table_cell('John Doe', col_name: 'Full Name')
+ end
end
end
it 'creates user' do
subject
click_action_item('New User')
expect(page).to have_current_path(new_admin_user_path)
- fill_in 'Full name', with: 'Johny Cage'
- click_button 'Create User'
+ within_form_for(User) do
+ fill_in 'Full name', with: 'Johny Cage'
+ click_submit 'Create User'
+ end
+
expect(page).to have_flash_message('User was successfully created.', type: :notice)
user = User.last!
expect(page).to have_current_path admin_user_path(user.id)
expect(User.count).to eq(1)
@@ -93,5 +101,10 @@
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Capybara::ActiveAdmin project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/activeadmin-plugins/capybara_active_admin/blob/master/CODE_OF_CONDUCT.md).
+
+## Notes
+
+Project uses [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
+Project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).