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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -127,7 +127,7 @@ feature Role do
scenario 'successfully removes role organization_admin' do scenario 'successfully removes role organization_admin' do
click_link('Admins', href: admins_admin_organization_path(organization.id)) 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 organization_admin.reload
expect(organization_admin.has_cached_role?('organization_admin', organization)).to be false expect(organization_admin.has_cached_role?('organization_admin', organization)).to be false
end end