Skip to content

Commit

Permalink
Merge pull request #2031 from Children-in-Families/OSC-18
Browse files Browse the repository at this point in the history
[IMP] Add clear cache test
  • Loading branch information
thorn-lysa authored May 12, 2022
2 parents fc7581c + b8ccf69 commit 2866074
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions spec/features/family_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
let!(:client){ create(:client, :accepted) }

before do
Rails.cache.clear
login_as(admin)
end

Expand Down
7 changes: 3 additions & 4 deletions spec/features/report_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@

before do
login_as(user)
Rails.cache.clear
end

feature 'Search client', js: true do
scenario 'for client' do
Rails.cache.clear
visit clients_path
find('.client-search').click
expect(page).to have_content('Search')
find('#client-grid-search-btn').click
sleep 10
wait_for_ajax()
expect(page).to have_content("Adam")
end
end

feature 'Search family', js: true do
let!(:family){ create(:family, children: [client.id] ) }
scenario 'for family' do
Rails.cache.clear
visit families_path
find('#client-grid-search-btn').click
sleep 10
wait_for_ajax()
expect(page).to have_content(family.id)
end
end
Expand Down

0 comments on commit 2866074

Please sign in to comment.