Remove datatables if there is no data

This commit is contained in:
rahul 2017-08-28 21:55:31 +05:30
parent b7901e54d6
commit fbd11a1402
3 changed files with 113 additions and 112 deletions

View file

@ -29,6 +29,7 @@
(
= link_to "#{@conference.booth_limit} booths", edit_admin_conference_path(@conference.short_title)
)
- if @booths.any?
%table.table.table-striped.table-bordered.table-hover.datatable
%thead
%th

View file

@ -7,6 +7,7 @@
Categorize events in your conference
.row
.col-md-12
- if @tracks.any?
%table.table.table-hover.table-striped.table-bordered.datatable#tracks
%thead
%th ID

View file

@ -42,11 +42,10 @@ feature Track do
expected.to change { Track.count }.by(-1)
expect(flash).to eq('Track successfully deleted.')
within('table#tracks') do
expect(page.has_css?('table#tracks')).to be false
expect(page.has_content?(track.name)).to be false
expect(page.has_content?(track.description)).to be false
end
end
scenario 'updates a track', feature: true, js: true do
create(:track, program_id: conference.program.id)