WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit e8165b2

Browse files
committed
wait_for_javascript_componentsを使用してブックマークボタンのloading状態が消えるのを待機するよう修正
1 parent f243d29 commit e8165b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/system/bookmark/regular_events_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ class Bookmark::RegularEventTest < ApplicationSystemTestCase
99

1010
test 'shows regular event link on list when clicking bookmark button' do
1111
visit_with_auth regular_event_path(@regular_event), 'machida'
12+
wait_for_javascript_components
1213
assert_selector '#bookmark-button', text: 'Bookmark'
1314
click_button 'Bookmark'
15+
wait_for_javascript_components
1416
assert_selector '#bookmark-button', text: 'Bookmark中'
1517

1618
visit current_user_bookmarks_path
@@ -22,16 +24,20 @@ class Bookmark::RegularEventTest < ApplicationSystemTestCase
2224

2325
test 'updates bookmarks list when toggling bookmark' do
2426
visit_with_auth regular_event_path(@regular_event), 'machida'
27+
wait_for_javascript_components
2528
assert_selector '#bookmark-button', text: 'Bookmark'
2629
click_button 'Bookmark'
30+
wait_for_javascript_components
2731
assert_selector '#bookmark-button', text: 'Bookmark中'
2832

2933
visit current_user_bookmarks_path
3034
assert_selector 'a.card-list-item-title__link', text: @regular_event.title
3135

3236
visit regular_event_path(@regular_event)
37+
wait_for_javascript_components
3338
assert_selector '#bookmark-button', text: 'Bookmark中'
3439
click_button 'Bookmark中'
40+
wait_for_javascript_components
3541
assert_selector '#bookmark-button', text: 'Bookmark'
3642

3743
visit current_user_bookmarks_path

0 commit comments

Comments
 (0)