Test the Quill JS presence and version

Этот коммит содержится в:
Mattia Roccoberton
2022-03-27 11:07:06 +02:00
родитель 6d0599c39e
Коммит 597cae7adb
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@@ -3,5 +3,6 @@
module ActiveAdmin
module QuillEditor
VERSION = '0.3.4'
QUILL_VERSION = '1.3.7'
end
end

10
spec/system/quill_js_spec.rb Обычный файл
Просмотреть файл

@@ -0,0 +1,10 @@
# frozen_string_literal: true
RSpec.describe 'Quill JS', type: :system do
it 'has a Javascript function defined and returns the version', :aggregate_failures do
visit '/admin/posts'
expect(page.evaluate_script('typeof Quill')).to eq 'function'
expect(page.evaluate_script('Quill.version')).to eq(ActiveAdmin::QuillEditor::QUILL_VERSION)
end
end