Fixes #2918 - Editing of KB article not possible if long text is pasted.
This commit is contained in:
parent
047a3aba87
commit
116606416c
2 changed files with 26 additions and 0 deletions
|
@ -11252,6 +11252,10 @@ span.is-disabled {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.richtext-content {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
margin: 1px 0 3px;
|
margin: 1px 0 3px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
22
spec/system/knowledge_base/locale/answer/edit_spec.rb
Normal file
22
spec/system/knowledge_base/locale/answer/edit_spec.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe 'Knowledge Base Locale Answer Edit', type: :system, authenticated: true do
|
||||||
|
include_context 'basic Knowledge Base'
|
||||||
|
|
||||||
|
before do
|
||||||
|
published_answer && draft_answer && internal_answer
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'when entering a long text' do
|
||||||
|
long_string = '3KKFA9DAWE9VJYNNnpYRRtMwfa168O1yvpD2t9QXsfb3cppGV6KZ12q0UUJIy5r4Exfk18GnWPR0A3SoDsjxIHz1Gcu4aCEVzenilSOu4gAfxnB6k3mSBUOGIfdgChEBYhcHGgiCmV2EoXu4gG7GAJxKJhM2d4NUiL5RZttGtMXYYFr2Jsg7MV7xXGcygnsLMYqnwzOJxBK0vH3fzhdIZd6YrqR3fggaY0RyKtVigOBZ2SETC8s238Z9eDL4gfUW'
|
||||||
|
|
||||||
|
visit "#knowledge_base/#{knowledge_base.id}/locale/#{primary_locale.system_locale.locale}/answer/#{draft_answer.id}/edit"
|
||||||
|
|
||||||
|
within(:active_content) do
|
||||||
|
find('.richtext-content').send_keys long_string
|
||||||
|
|
||||||
|
expect(page).to have_css('.js-submit') { |elem| !elem.obscured? }
|
||||||
|
expect(page).to have_css('.page-header-title') { |elem| !elem.obscured? }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue