From f5a5745efa9694e119d8cb14d7db15c2d87508db Mon Sep 17 00:00:00 2001 From: Mark Bussey Date: Tue, 31 Aug 2021 14:52:44 -0500 Subject: [PATCH] Display the Field Guide with dashboard layout We want the Field Guide to share the same layout as other admin dashboard screens. --- app/controllers/zizia/metadata_details_controller.rb | 2 ++ spec/dummy/spec/system/metadata_details_page_spec.rb | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/controllers/zizia/metadata_details_controller.rb b/app/controllers/zizia/metadata_details_controller.rb index a891934..708eeea 100644 --- a/app/controllers/zizia/metadata_details_controller.rb +++ b/app/controllers/zizia/metadata_details_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true module Zizia class MetadataDetailsController < ::ApplicationController + with_themed_layout 'dashboard' + def show @details = MetadataDetails.instance.details(work_attributes: WorkAttributes.instance) diff --git a/spec/dummy/spec/system/metadata_details_page_spec.rb b/spec/dummy/spec/system/metadata_details_page_spec.rb index 7d29a89..bf78b3f 100644 --- a/spec/dummy/spec/system/metadata_details_page_spec.rb +++ b/spec/dummy/spec/system/metadata_details_page_spec.rb @@ -3,6 +3,12 @@ include Warden::Test::Helpers RSpec.describe 'Viewing the field guide' do + let(:admin_user) { FactoryBot.create(:admin) } + + before do + login_as admin_user + end + it 'renders correctly' do visit('/importer_documentation/guide') expect(page).to have_content('title')