Testing ShowInApp Action Implementation in rails_admin
This test suite validates the ShowInApp action functionality in Rails Admin, focusing on the proper implementation of Turbo attributes in show links. The tests ensure correct rendering and behavior of show links in both index and detail views.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
railsadminteam/rails_admin
spec/integration/actions/show_in_app_spec.rb
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'ShowInApp action', type: :request do
subject { page }
describe 'link' do
let!(:player) { FactoryBot.create :player }
it 'has the data-turbo: false attribute' do
visit index_path(model_name: 'player')
is_expected.to have_selector(%(li[title="Show in app"] a[data-turbo="false"]))
click_link 'Show'
is_expected.to have_selector(%(a[data-turbo="false"]), text: 'Show in app')
end
end
end