Correct invalid table markup

- Add required <tr> within <thead>
  - Add implicit <tbody> after <thead>
This commit is contained in:
Andrew Kvalheim 2023-03-04 13:12:47 -08:00
parent 097470bb0c
commit 1f31c1c80d
37 changed files with 330 additions and 291 deletions

View file

@ -56,6 +56,7 @@
- if @booths.any?
%table.datatable
%thead
%tr
%th
%b ID
%th
@ -70,6 +71,7 @@
%b State
%th
%b Actions
%tbody
- @booths.each do |booth|
%tr
%td

View file

@ -10,6 +10,7 @@
.col-md-12
%table.table.table-hover#tickets
%thead
%tr
%th Type
%th Start Date
%th End Date

View file

@ -8,6 +8,7 @@
.col-md-12
%table.table.table-hover#difficulty_levels
%thead
%tr
%th Title
%th Description
%th Color

View file

@ -8,6 +8,7 @@
.col-md-12
%table.table.table-hover#event_types
%thead
%tr
%th Title
%th Description
%th Length

View file

@ -58,6 +58,7 @@
.margin-event-table
%table.datatable
%thead
%tr
%th
%b ID
%th
@ -87,6 +88,7 @@
%th
.fa-solid.fa-comment
%th Add Survey
%tbody
- @events.each do |event|
= render 'datatable_row',
event: event,

View file

@ -18,6 +18,7 @@
.well
%table.datatable#registrations
%thead
%tr
%th
%th Name
%th Email

View file

@ -20,6 +20,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th ID
%th Description
%th Actions

View file

@ -3,6 +3,7 @@
- if users.present?
%table.datatable#users
%thead
%tr
%th Name
%th Email
- if ( can? :unassign_org_admins, organization )

View file

@ -11,6 +11,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th Name
%th Upcoming Conferences
%th Past Conferences

View file

@ -18,6 +18,7 @@
.col-md-12
%table.datatable#tickets
%thead
%tr
%th ID
%th Type
%th User

View file

@ -13,6 +13,7 @@
%table.datatable#question_users
%thead
%tr
%th Name
%th Username
%th Email

View file

@ -10,6 +10,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th ID
%th Title
%th Speakers Registered

View file

@ -9,6 +9,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th ID
%th Title
%th Speaker(s)

View file

@ -9,6 +9,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th ID
%th Title
%th Speaker(s)

View file

@ -9,6 +9,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th Speaker Name
%th Registered?
%th Event

View file

@ -9,6 +9,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th Name
%th Left( Left/Total )
%th Used

View file

@ -9,6 +9,7 @@
.col-md-12
%table.table.table-bordered.table-striped.table-hover#roles
%thead
%tr
%th ID
%th Name
%th Description

View file

@ -10,6 +10,7 @@
.col-md-12
%table.table.table-hover#rooms
%thead
%tr
%th Name
%th Capacity
%th Actions

View file

@ -16,6 +16,7 @@
.col-md-12
%table.table.table-hover
%thead
%tr
%th Schedule
%th Selected
%th Actions
@ -59,6 +60,7 @@
.col-md-12
%table.table.table-hover
%thead
%tr
%th Schedule
%th Track
%th Selected

View file

@ -9,6 +9,7 @@
.col-md-12
%table.table.table-hover#sponsors
%thead
%tr
%th Logo
%th Name
%th Description

View file

@ -9,6 +9,7 @@
.col-md-12
%table.table.table-hover#sponsorship_levels
%thead
%tr
%th Title
%th Position
%th Actions

View file

@ -7,6 +7,7 @@
- if survey_question.survey_replies.any?
%table.table
%thead
%tr
%th User Email
%th Reply
%tbody

View file

@ -13,6 +13,7 @@
.col-md-12
%table.table.table-hover.datatable#surveys
%thead
%tr
%th Title
%th # of questions
%th # of submissions

View file

@ -10,6 +10,7 @@
.col-md-12
%table.datatable#tickets
%thead
%tr
%th Title
%th Price
%th Sold

View file

@ -14,6 +14,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th #
%th Name
%th Quantity

View file

@ -35,6 +35,7 @@
- if @tracks.any?
%table.datatable#tracks
%thead
%tr
%th ID
%th Name
%th Description

View file

@ -109,6 +109,7 @@
.col-md-12
%table.datatable
%thead
%tr
%th Title
%th Type
%th Submitter

View file

@ -7,6 +7,7 @@
.well
%table.datatable#event_registrations
%thead
%tr
%th ID
%th Conference
%th Title

View file

@ -6,6 +6,7 @@
.well
%table.datatable#submissions
%thead
%tr
%th ID
%th Conference
%th Title

View file

@ -12,6 +12,7 @@
.col-md-12.table-responsive
%table.datatable#users{ data: { source: admin_users_path(format: :json) } }
%thead
%tr
%th{ width: '0' } ID
%th{ width: '0' } Confirmed?
%th{ width: '0' } Email

View file

@ -1,6 +1,7 @@
.well
%table.table.table-striped.table-bordered.table-hover#volunteerstable
%thead
%tr
%th First Name
%th Last Name
%th Email

View file

@ -8,6 +8,7 @@
.margin-booth-table
%table.table.table-striped.table-hover
%thead
%tr
%th
%b State
%th
@ -16,6 +17,7 @@
%b Title
%th
%b Actions
%tbody
- @booths.each do |booth|
%tr
%td{ style: "padding:20px 8px 20px 8px;" }

View file

@ -13,6 +13,7 @@
- if @physical_tickets.present?
%table.table.table-bordered.table-striped.table-hover#roles
%thead
%tr
%th ID
%th Type
%th User

View file

@ -15,6 +15,7 @@
.well
%table.datatable#registrations
%thead
%tr
%th
%th Name
%th Email

View file

@ -10,6 +10,7 @@
- if @unpaid_ticket_purchases.present?
%table.table.table-bordered.table-striped.table-hover#roles
%thead
%tr
%th ID
%th Type
%th Quantity

View file

@ -13,7 +13,7 @@ feature EventType do
visit admin_conference_program_event_types_path(
conference_id: conference.short_title)
within('table#event_types') do
within('table#event_types > tbody') do
expect(page.assert_selector('tr', count: 2)).to be true
end
@ -30,7 +30,7 @@ feature EventType do
page.find('#flash')
# Validations
expect(flash).to eq('Event type successfully created.')
within('table#event_types') do
within('table#event_types > tbody') do
expect(page.has_content?('Party')).to be true
expect(page.has_content?('13042')).to be true
expect(page.has_content?('#E4E4E4')).to be true
@ -44,7 +44,7 @@ feature EventType do
page.find('#flash')
expect(flash).to eq('Event type successfully deleted.')
within('table#event_types') do
within('table#event_types > tbody') do
expect(page.assert_selector('tr', count: 2)).to be true
expect(page.has_content?('Party')).to be false
end

View file

@ -127,7 +127,7 @@ feature Role do
scenario 'successfully removes role organization_admin' do
click_link('Admins', href: admins_admin_organization_path(organization.id))
first('tr').find('.btn-danger').click
first('tbody > tr').find('.btn-danger').click
organization_admin.reload
expect(organization_admin.has_cached_role?('organization_admin', organization)).to be false
end