From a7791635aa98f012d35f97c3c5288494bbb28e38 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 13 Mar 2024 18:03:43 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- test/system/exports_test.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/system/exports_test.rb (limited to 'test/system/exports_test.rb') diff --git a/test/system/exports_test.rb b/test/system/exports_test.rb new file mode 100644 index 0000000..b324321 --- /dev/null +++ b/test/system/exports_test.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'application_system_test_case' + +class ExportsTest < ApplicationSystemTestCase + setup do + sign_in! + end + + test 'can access exports from the hidden menu' do + find('#toggle-hidden-global-menu').click + assert_text I18n.t('searches.export.action') + + click_on I18n.t('searches.export.action') + assert_text I18n.t('searches.export.note-msg') + assert page.current_path == new_search_exports_path(0) + end + + test 'can export using multiple formats' do + visit new_search_exports_path(0) + + assert find('#export-format-button')[:href].ends_with?('/searches/0/exports.csv') + + find('#export-select-format').select('UOC') + assert find('#export-format-button')[:href].ends_with?('/searches/0/exports.uoc') + end +end -- cgit v1.2.3