-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
see frab#581
- Loading branch information
Showing
12 changed files
with
257 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'test_helper' | ||
|
||
class BulkEditTest < FeatureTest | ||
setup do | ||
@conference = create(:three_day_conference_with_events_and_speakers) | ||
@event = @conference.events.last | ||
@event.update( event_type: 'podium') | ||
@admin = create(:admin_user) | ||
end | ||
|
||
it 'can bulk edit', js: true do | ||
sign_in_user(@admin) | ||
|
||
visit "/#{@conference.acronym}/events" | ||
click_on 'podium' | ||
|
||
find('form.bulk_edit_event_type', visible: :hidden) | ||
click_on 'Edit these events' | ||
|
||
find('form.bulk_edit_event_type').select 'Film', from: 'bulk_set_value' | ||
find('form.bulk_edit_event_type').click_on 'Set' | ||
|
||
assert_content page, 'edit completed successfully' | ||
assert_content page, 'yielded no results' | ||
|
||
click_on '[x]' # Back to "all events" | ||
assert_content page, /(?i)film/ # @event was updated successfully | ||
refute_content page, /(?i)podium/ # @event was updated successfully | ||
assert_content page, /(?i)talk/ # Other events were not modified | ||
end | ||
end | ||
|