spec/features/exhibits/translation_editing_spec.rb in blacklight-spotlight-3.0.0.rc1 vs spec/features/exhibits/translation_editing_spec.rb in blacklight-spotlight-3.0.0.rc2
- old
+ new
@@ -146,11 +146,11 @@
describe 'Catalog' do
before do
within '.translation-edit-form #general' do
fill_in 'Home', with: 'Maison'
- fill_in 'Search Results', with: 'Résultats de la recherche'
+ fill_in 'Search results', with: 'Résultats de la recherche'
click_button 'Save changes'
end
end
it 'adds breadcrumbs user facing catalog' do
@@ -308,11 +308,11 @@
it 'allows users to translation sort fields', js: true do
click_link 'Search field labels'
within('#search_fields', visible: true) do
- fill_in 'Relevance', with: 'French Relevance'
+ fill_in 'relevance', with: 'French Relevance'
click_button 'Save changes'
end
visit spotlight.search_exhibit_catalog_path(exhibit, q: '*', locale: 'fr')
@@ -331,20 +331,20 @@
it 'has a title and description for every browse category' do
within '#browse' do
expect(page).to have_css('input[type="text"]', count: 4)
expect(page).to have_css('textarea', count: 2)
- expect(page).to have_field 'All Exhibit Items'
+ expect(page).to have_field 'All exhibit items'
expect(page).to have_field 'Browse Category 1'
expect(page).to have_css('.form-text', text: 'All items in this exhibit.')
end
end
it 'redirects to the same form tab' do
click_link 'Browse categories'
within('#browse', visible: true) do
- fill_in 'All Exhibit Items', with: "Tous les objets d'exposition"
+ fill_in 'All exhibit items', with: "Tous les objets d'exposition"
click_button 'Save changes'
end
expect(page).to have_css '.nav-pills .nav-link.active', text: 'French'
expect(page).to have_css '.nav-tabs .nav-link.active', text: 'Browse categories'
@@ -352,11 +352,11 @@
it 'persists changes', js: true do
click_link 'Browse categories'
within('#browse', visible: true) do
- fill_in 'All Exhibit Items', with: "Tous les objets d'exposition"
+ fill_in 'All exhibit items', with: "Tous les objets d'exposition"
first('.translation-description-toggle').click
textarea = page.find('textarea')
textarea.set('Tous les articles de cette exposition.')
@@ -364,10 +364,10 @@
click_button 'Save changes'
end
expect(page).to have_css('.flash_messages', text: 'The exhibit was successfully updated.')
- expect(exhibit.searches.first.title).to eq 'All Exhibit Items'
+ expect(exhibit.searches.first.title).to eq 'All exhibit items'
expect(exhibit.searches.first.long_description).to eq 'All items in this exhibit.'
I18n.locale = :fr
Translation.current_exhibit = exhibit
expect(exhibit.searches.first.title).to eq "Tous les objets d'exposition"