mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
28 lines
734 B
Ruby
28 lines
734 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe 'Admin Panel > Knowledge Base > Create', type: :system do
|
|
before do
|
|
visit '/#manage/knowledge_base'
|
|
end
|
|
|
|
context 'with valid data' do
|
|
it 'creates a knowledge base' do
|
|
find('[data-name="kb_locales"] .js-input').fill_in with: 'Lithuanian'
|
|
find('.js-option.is-active').click
|
|
|
|
click_on 'Create Knowledge Base'
|
|
|
|
expect(page).to have_text('Theme').and have_text('Languages')
|
|
end
|
|
end
|
|
|
|
context 'with missing locale' do
|
|
it 'shows validation error' do
|
|
click_on 'Create Knowledge Base'
|
|
|
|
expect(page).to have_text('At least one locale is required.')
|
|
end
|
|
end
|
|
end
|