releaf-core 1.1.21 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/releaf_core_manifest.js +3 -0
- data/app/assets/images/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/app/assets/images/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/app/assets/images/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/app/assets/images/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/app/assets/images/ckeditor/plugins/icons.png +0 -0
- data/app/assets/images/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/app/assets/images/ckeditor/plugins/image/images/noimage.png +0 -0
- data/app/assets/images/ckeditor/plugins/link/images/anchor.png +0 -0
- data/app/assets/images/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/app/assets/images/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/app/assets/images/ckeditor/plugins/widget/images/handle.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/icons.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/app/assets/javascripts/ckeditor-jquery.js +3 -0
- data/app/assets/javascripts/ckeditor/CHANGES.md +1637 -0
- data/app/assets/javascripts/ckeditor/LICENSE.md +1420 -0
- data/app/assets/javascripts/ckeditor/README.md +39 -0
- data/app/assets/javascripts/ckeditor/basepath.js.erb +6 -0
- data/app/assets/javascripts/ckeditor/build-config.js +190 -0
- data/app/assets/javascripts/ckeditor/ckeditor.js +1331 -0
- data/app/assets/javascripts/ckeditor/config.js +10 -0
- data/app/assets/javascripts/ckeditor/jquery.js +10 -0
- data/app/assets/javascripts/ckeditor/lang/af.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ar.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/az.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bg.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bs.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/cs.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/cy.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/da.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/de.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/el.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-au.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/eo.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/es.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/et.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/eu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fa.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fo.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/gl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/gu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/he.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/id.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/is.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/it.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ja.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ka.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/km.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ko.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ku.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/lt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/lv.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/mk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/mn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ms.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/nb.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/nl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/no.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/oc.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ro.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/si.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sq.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sv.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/th.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/tr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/tt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ug.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/uk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/vi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/zh.js +5 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/app/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +25 -0
- data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +24 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +44 -0
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +30 -0
- data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +55 -0
- data/app/assets/javascripts/ckeditor/plugins/preview/preview.html +13 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
- data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +91 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/app/assets/javascripts/ckeditor/styles.js +137 -0
- data/app/assets/javascripts/releaf/include/remote_validator.js +1 -1
- data/app/assets/javascripts/releaf/include/store_settings.js +2 -2
- data/app/assets/javascripts/releaf/include/url_builder.js +130 -130
- data/app/assets/stylesheets/ckeditor/contents.css +208 -0
- data/app/assets/stylesheets/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
- data/app/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
- data/app/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
- data/app/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +84 -0
- data/app/assets/stylesheets/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/app/assets/stylesheets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- data/app/builders/releaf/builders.rb +4 -1
- data/app/builders/releaf/builders/base.rb +1 -1
- data/app/builders/releaf/builders/form_builder/associations.rb +1 -1
- data/app/builders/releaf/builders/page/layout_builder.rb +1 -1
- data/app/builders/releaf/builders/pagination_builder.rb +1 -1
- data/app/builders/releaf/builders/table_builder.rb +0 -1
- data/app/controllers/releaf/action_controller.rb +2 -2
- data/app/controllers/releaf/root_controller.rb +9 -7
- data/app/helpers/releaf/application_helper.rb +2 -2
- data/app/lib/releaf/action_controller/features.rb +1 -6
- data/app/lib/releaf/build_errors_hash.rb +12 -12
- data/app/lib/releaf/responders.rb +0 -1
- data/app/lib/releaf/search.rb +5 -18
- data/app/models/releaf/settings.rb +1 -1
- data/app/views/releaf/action/create_releaf_richtext_attachment.haml +2 -1
- data/app/views/releaf/error_pages/access_denied.html.haml +1 -1
- data/lib/generators/dummy/install_generator.rb +2 -1
- data/lib/generators/dummy/templates/assets/config/manifest.js +3 -0
- data/lib/generators/dummy/templates/controllers/application_controller.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_authors.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_banner_groups.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_banner_pages.rb +2 -2
- data/lib/generators/dummy/templates/migrations/create_banners.rb +2 -2
- data/lib/generators/dummy/templates/migrations/create_book_sequels.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_books.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_bundles.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_chapters.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_home_pages.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_node_extra_fields.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_other_nodes.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_publishers.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_text_pages.rb +1 -1
- data/lib/generators/dummy/templates/models/author.rb +1 -1
- data/lib/generators/dummy/templates/models/banner.rb +1 -1
- data/lib/generators/dummy/templates/models/banner_group.rb +1 -1
- data/lib/generators/dummy/templates/models/book.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_permissions.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_richtext_attachments.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_settings.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_users.rb +1 -1
- data/lib/releaf-core.rb +1 -2
- data/lib/releaf/engine.rb +2 -3
- data/lib/releaf/rails_ext/globalize-accessors.rb +64 -0
- data/lib/releaf/rails_ext/validation_error_codes.rb +0 -36
- metadata +420 -222
- data/app/lib/releaf/responders/feature_disabled_responder.rb +0 -9
- data/app/views/releaf/error_pages/feature_disabled.html.haml +0 -1
- data/spec/builders/releaf/builders/association_reflector_spec.rb +0 -138
- data/spec/builders/releaf/builders/base_spec.rb +0 -272
- data/spec/builders/releaf/builders/collection_spec.rb +0 -18
- data/spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb +0 -71
- data/spec/builders/releaf/builders/confirm_dialog_builder_spec.rb +0 -107
- data/spec/builders/releaf/builders/edit_builder_spec.rb +0 -322
- data/spec/builders/releaf/builders/form_builder/associations_spec.rb +0 -129
- data/spec/builders/releaf/builders/form_builder/date_fields_spec.rb +0 -86
- data/spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb +0 -48
- data/spec/builders/releaf/builders/form_builder/label_spec.rb +0 -106
- data/spec/builders/releaf/builders/form_builder/number_fields_spec.rb +0 -37
- data/spec/builders/releaf/builders/form_builder_spec.rb +0 -228
- data/spec/builders/releaf/builders/index_builder_spec.rb +0 -364
- data/spec/builders/releaf/builders/page/header_builder_spec.rb +0 -65
- data/spec/builders/releaf/builders/page/layout_builder_spec.rb +0 -237
- data/spec/builders/releaf/builders/page/menu_builder_spec.rb +0 -345
- data/spec/builders/releaf/builders/pagination_builder_spec.rb +0 -330
- data/spec/builders/releaf/builders/resource_dialog_spec.rb +0 -21
- data/spec/builders/releaf/builders/resource_view_spec.rb +0 -158
- data/spec/builders/releaf/builders/show_builder_spec.rb +0 -7
- data/spec/builders/releaf/builders/table_builder_spec.rb +0 -637
- data/spec/builders/releaf/builders/template_spec.rb +0 -12
- data/spec/builders/releaf/builders/toolbox_builder_spec.rb +0 -67
- data/spec/builders/releaf/builders/toolbox_spec.rb +0 -48
- data/spec/builders/releaf/builders/utilities/date_fields_spec.rb +0 -125
- data/spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb +0 -318
- data/spec/builders/releaf/builders/view_spec.rb +0 -281
- data/spec/builders/releaf/builders_spec.rb +0 -134
- data/spec/builders/releaf/settings/form_builder_spec.rb +0 -48
- data/spec/builders/releaf/settings/table_builder_spec.rb +0 -23
- data/spec/controllers/concerns/releaf/richtext_attachments_spec.rb +0 -51
- data/spec/controllers/releaf/action_controller_spec.rb +0 -423
- data/spec/controllers/releaf/root_controller_spec.rb +0 -45
- data/spec/controllers/releaf/settings_controller_spec.rb +0 -52
- data/spec/error_hash_builder_spec.rb +0 -83
- data/spec/ext/array_reorder_spec.rb +0 -12
- data/spec/features/ajaxbox_spec.rb +0 -111
- data/spec/features/authorization_spec.rb +0 -50
- data/spec/features/breadcrumbs_spec.rb +0 -16
- data/spec/features/dragonfly_integration_spec.rb +0 -24
- data/spec/features/edit_actions_spec.rb +0 -186
- data/spec/features/errors_spec.rb +0 -47
- data/spec/features/index_actions_spec.rb +0 -85
- data/spec/features/index_table_spec.rb +0 -35
- data/spec/features/menu_spec.rb +0 -71
- data/spec/features/richtext_attachments_spec.rb +0 -64
- data/spec/features/richtext_custom_config_spec.rb +0 -28
- data/spec/features/richtext_embed_spec.rb +0 -29
- data/spec/features/richtext_spec.rb +0 -31
- data/spec/features/search_spec.rb +0 -825
- data/spec/features/settings_spec.rb +0 -70
- data/spec/features/title_spec.rb +0 -13
- data/spec/fixtures/common_fields.yml +0 -17
- data/spec/fixtures/cs.png +0 -0
- data/spec/fixtures/time.formats.xlsx +0 -0
- data/spec/fixtures/unicorn.jpg +0 -0
- data/spec/helpers/application_helper_spec.rb +0 -73
- data/spec/helpers/button_helper_spec.rb +0 -146
- data/spec/lib/releaf/action_controller/features_spec.rb +0 -171
- data/spec/lib/releaf/action_controller/search_spec.rb +0 -84
- data/spec/lib/releaf/application_spec.rb +0 -43
- data/spec/lib/releaf/assets_resolver_spec.rb +0 -130
- data/spec/lib/releaf/build_errors_hash_spec.rb +0 -141
- data/spec/lib/releaf/configuration_spec.rb +0 -205
- data/spec/lib/releaf/controller_definition_spec.rb +0 -78
- data/spec/lib/releaf/controller_group_definition_spec.rb +0 -33
- data/spec/lib/releaf/default_searchable_fields_spec.rb +0 -161
- data/spec/lib/releaf/instance_cache_spec.rb +0 -98
- data/spec/lib/releaf/resource_base_spec.rb +0 -212
- data/spec/lib/releaf/resource_fields_spec.rb +0 -12
- data/spec/lib/releaf/resource_params_spec.rb +0 -115
- data/spec/lib/releaf/resource_table_fields_spec.rb +0 -20
- data/spec/lib/releaf/resource_utilities_spec.rb +0 -87
- data/spec/lib/releaf/responders/access_denied_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders/after_save_responder_spec.rb +0 -88
- data/spec/lib/releaf/responders/confirm_destroy_responder_spec.rb +0 -26
- data/spec/lib/releaf/responders/destroy_responder_spec.rb +0 -30
- data/spec/lib/releaf/responders/error_responder_spec.rb +0 -26
- data/spec/lib/releaf/responders/feature_disabled_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders/page_not_found_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders_spec.rb +0 -60
- data/spec/lib/releaf/root/configuration_spec.rb +0 -9
- data/spec/lib/releaf/root/default_controller_resolver_spec.rb +0 -44
- data/spec/lib/releaf/root_spec.rb +0 -13
- data/spec/lib/releaf/service_spec.rb +0 -20
- data/spec/lib/releaf/settings/normalize_value_spec.rb +0 -103
- data/spec/lib/releaf/settings/register_spec.rb +0 -135
- data/spec/lib/releaf/settings_manager_spec.rb +0 -22
- data/spec/lib/validation_error_codes_spec.rb +0 -56
- data/spec/misc/factories_spec.rb +0 -31
- data/spec/models/settings_spec.rb +0 -100
- data/spec/routing/route_mapper_spec.rb +0 -185
- data/spec/rspec_helpers/test_helpers_spec.rb +0 -20
- data/spec/rspec_helpers/test_spec.rb +0 -14
- data/spec/services/array/reorder_spec.rb +0 -121
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe Releaf::RootController do
|
4
|
-
login_as_user :user
|
5
|
-
|
6
|
-
describe "#features" do
|
7
|
-
it "has no features" do
|
8
|
-
expect(subject.features).to eq([])
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe "GET home" do
|
13
|
-
it "redirects to default controller resolver returned path authorized as user" do
|
14
|
-
allow(Releaf.application.config.root.default_controller_resolver).to receive(:call)
|
15
|
-
.with(current_controller: subject).and_return("_randompath_")
|
16
|
-
get :home
|
17
|
-
expect(response).to redirect_to("_randompath_")
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "PUT settings" do
|
22
|
-
context 'when params[:settings] is not Hash' do
|
23
|
-
it "has a 422 status code" do
|
24
|
-
post :store_settings
|
25
|
-
expect(Releaf.application.config.settings_manager).to_not receive(:write)
|
26
|
-
expect(response.status).to eq(422)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
context 'when params[:settings] is Hash' do
|
31
|
-
it "has a 200 status code" do
|
32
|
-
allow(Releaf.application.config.settings_manager).to receive(:write)
|
33
|
-
post :store_settings, settings: {dummy: 'maybe'}
|
34
|
-
expect(response.status).to eq(200)
|
35
|
-
end
|
36
|
-
|
37
|
-
it "saves given data within current user settings, casting true/false strings to boolean" do
|
38
|
-
expect(Releaf.application.config.settings_manager).to receive(:write).with(controller: subject, key: "dummy", value: "maybe")
|
39
|
-
expect(Releaf.application.config.settings_manager).to receive(:write).with(controller: subject, key: "be_true", value: true)
|
40
|
-
expect(Releaf.application.config.settings_manager).to receive(:write).with(controller: subject, key: "be_false", value: false)
|
41
|
-
post :store_settings, settings: {dummy: "maybe", be_true: 'true', be_false: 'false'}
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe Releaf::SettingsController do
|
4
|
-
login_as_user :user
|
5
|
-
|
6
|
-
describe "GET index" do
|
7
|
-
login_as_user :user
|
8
|
-
it "lists only settings that not scoped to any object and exists within `Releaf::Settings.registry`" do
|
9
|
-
Releaf::Settings.destroy_all
|
10
|
-
Releaf::Settings.registry = {}
|
11
|
-
|
12
|
-
Releaf::Settings.create(var: "a", value: "1")
|
13
|
-
Releaf::Settings.create(var: "b", value: "2")
|
14
|
-
Releaf::Settings.create(var: "c", value: "2")
|
15
|
-
Releaf::Settings.create(var: "a", value: "3", thing_type: "User", thing_id: "1")
|
16
|
-
|
17
|
-
Releaf::Settings.register(key: "a", default: "x", description: "some setting")
|
18
|
-
Releaf::Settings.register(key: "b", default: "xxxx", description: "some other setting")
|
19
|
-
|
20
|
-
get :index
|
21
|
-
expect(assigns(:collection).size).to eq(2)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe "PATCH update" do
|
26
|
-
login_as_user :user
|
27
|
-
it "updates settings object with normalized value" do
|
28
|
-
Releaf::Settings.destroy_all
|
29
|
-
Releaf::Settings.registry = {}
|
30
|
-
Releaf::Settings.register(key: "a", default: false, type: "boolean")
|
31
|
-
|
32
|
-
allow(Releaf::Settings::NormalizeValue).to receive(:call).
|
33
|
-
with(value: "1", input_type: :boolean).and_return(88)
|
34
|
-
|
35
|
-
patch :update, {id: Releaf::Settings.first.id, resource: {value: "1"}}
|
36
|
-
expect(Releaf::Settings.first.value).to eq(88)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe "#features" do
|
41
|
-
it "has `index`, `search` and `edit` features" do
|
42
|
-
expect(subject.features).to eq([:index, :edit, :search])
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe "#resources" do
|
47
|
-
it "returns only registered settings ordered by `var`" do
|
48
|
-
allow(Releaf::Settings).to receive(:registered).and_return(:x)
|
49
|
-
expect(subject.resources).to eq(:x)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,83 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
describe "Errors hash builder" do
|
3
|
-
class DummyResourceValidatorAuthor < Author
|
4
|
-
self.table_name = 'authors'
|
5
|
-
has_many :books, inverse_of: :author, class_name: :DummyResourceValidatorBook, foreign_key: :author_id
|
6
|
-
end
|
7
|
-
|
8
|
-
class DummyResourceValidatorBook < Book
|
9
|
-
self.table_name = 'books'
|
10
|
-
belongs_to :author, inverse_of: :books, class_name: :DummyResourceValidatorAuthor
|
11
|
-
|
12
|
-
validates_presence_of :author
|
13
|
-
accepts_nested_attributes_for :author
|
14
|
-
end
|
15
|
-
|
16
|
-
let(:resource) { DummyResourceValidatorBook.new }
|
17
|
-
let(:error){ ActiveModel::ErrorMessage.new("blank value", :blank) }
|
18
|
-
|
19
|
-
subject do
|
20
|
-
Releaf::BuildErrorsHash.new(resource: resource, field_name_prefix: :resource)
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "#format_errors" do
|
24
|
-
it "adds error to errors" do
|
25
|
-
expected_result = {
|
26
|
-
"resource[title]" => [
|
27
|
-
{error_code: :blank, message: "can't be blank"},
|
28
|
-
{error_code: :invalid, message: "test error"},
|
29
|
-
],
|
30
|
-
"resource[author_id]" => [
|
31
|
-
{error_code: :blank, message: "can't be blank"},
|
32
|
-
{error_code: :invalid, message: "Invalid author"}
|
33
|
-
],
|
34
|
-
"resource" => [
|
35
|
-
{error_code: :invalid, message: "error on base"}
|
36
|
-
]
|
37
|
-
}
|
38
|
-
resource.valid?
|
39
|
-
resource.chapters.new(id: 12)
|
40
|
-
resource.chapters.new(title: 'test')
|
41
|
-
resource.errors.add(:base, 'error on base')
|
42
|
-
resource.errors.add(:title, "test error")
|
43
|
-
resource.errors.add(:author_id, "Invalid author")
|
44
|
-
expect(subject.call).to eq(expected_result)
|
45
|
-
|
46
|
-
resource.title = "xxx"
|
47
|
-
resource.build_author
|
48
|
-
resource.valid?
|
49
|
-
|
50
|
-
expected_result = {
|
51
|
-
"resource[chapters_attributes][0][title]" => [
|
52
|
-
{error_code: :blank, message: "can't be blank"},
|
53
|
-
{error_code: :blank, message: "can't be blank"},
|
54
|
-
{error_code: :blank, message: "can't be blank"}
|
55
|
-
],
|
56
|
-
"resource[chapters_attributes][0][text]" => [
|
57
|
-
{error_code: :blank, message: "can't be blank"},
|
58
|
-
{error_code: :blank, message: "can't be blank"},
|
59
|
-
{error_code: :blank, message: "can't be blank"}
|
60
|
-
],
|
61
|
-
"resource[chapters_attributes][0][sample_html]" => [
|
62
|
-
{error_code: :blank, message: "can't be blank"},
|
63
|
-
{error_code: :blank, message: "can't be blank"},
|
64
|
-
{error_code: :blank, message: "can't be blank"}
|
65
|
-
],
|
66
|
-
"resource[chapters_attributes][1][text]" => [
|
67
|
-
{error_code: :blank, message: "can't be blank"},
|
68
|
-
{error_code: :blank, message: "can't be blank"},
|
69
|
-
{error_code: :blank, message: "can't be blank"}
|
70
|
-
],
|
71
|
-
"resource[chapters_attributes][1][sample_html]" => [
|
72
|
-
{error_code: :blank, message: "can't be blank"},
|
73
|
-
{error_code: :blank, message: "can't be blank"},
|
74
|
-
{error_code: :blank, message: "can't be blank"}
|
75
|
-
],
|
76
|
-
"resource[author_attributes][name]" => [
|
77
|
-
{error_code: :blank, message: "can't be blank"}
|
78
|
-
]
|
79
|
-
}
|
80
|
-
expect(subject.call).to eq(expected_result)
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Array do
|
4
|
-
let(:subject){ [:a, :b, :c] }
|
5
|
-
|
6
|
-
describe "#reorder" do
|
7
|
-
it "return reordered result for given options from `Array::Reorder` service" do
|
8
|
-
expect(Array::Reorder).to receive(:call).with(array: subject, values: :b, options: :last).and_call_original
|
9
|
-
expect(subject.reorder(:b, :last)).to eq([:a, :c, :b])
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,111 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
feature "Ajaxbox", js: true do
|
3
|
-
background do
|
4
|
-
auth_as_user
|
5
|
-
end
|
6
|
-
|
7
|
-
scenario "Close ajaxbox with footer 'cancel' button without reloading page" do
|
8
|
-
user = Releaf::Permissions::User.last
|
9
|
-
visit releaf_permissions_users_path
|
10
|
-
click_link user.name
|
11
|
-
expect(page).to have_header(text: user.releaf_title)
|
12
|
-
|
13
|
-
open_toolbox_dialog "Delete"
|
14
|
-
within_dialog{ click_link "No" }
|
15
|
-
expect(page).to_not have_css(".dialog")
|
16
|
-
expect(current_path).to eq(edit_releaf_permissions_user_path(user))
|
17
|
-
end
|
18
|
-
|
19
|
-
scenario "Close ajaxbox with footer 'cancel' button (wrapped within form) without reloading page" do
|
20
|
-
node = create(:home_page_node, name: "MyNode")
|
21
|
-
node_path = edit_admin_node_path(node)
|
22
|
-
visit node_path
|
23
|
-
open_toolbox_dialog "Move"
|
24
|
-
within_dialog{ click_link "Cancel" }
|
25
|
-
expect(page).to_not have_css(".dialog")
|
26
|
-
expect(current_path).to eq(node_path)
|
27
|
-
end
|
28
|
-
|
29
|
-
scenario "Close ajaxbox with header 'close' button without reloading page" do
|
30
|
-
node = create(:home_page_node, name: "MyNode")
|
31
|
-
node_path = edit_admin_node_path(node)
|
32
|
-
visit node_path
|
33
|
-
open_toolbox_dialog "Add child"
|
34
|
-
within_dialog{ find("button.close").click }
|
35
|
-
expect(page).to_not have_css(".dialog")
|
36
|
-
expect(current_path).to eq(node_path)
|
37
|
-
end
|
38
|
-
|
39
|
-
scenario "Drag ajaxbox within header" do
|
40
|
-
node = create(:home_page_node, name: "MyNode")
|
41
|
-
node_path = edit_admin_node_path(node)
|
42
|
-
visit node_path
|
43
|
-
open_toolbox_dialog "Add child"
|
44
|
-
header = find(".dialog > header")
|
45
|
-
target = find("body > header a.home")
|
46
|
-
|
47
|
-
start_position = page.driver.evaluate_script <<-EOS
|
48
|
-
function() {
|
49
|
-
var ele = jQuery(".dialog")[0];
|
50
|
-
var rect = ele.getBoundingClientRect();
|
51
|
-
return [rect.left, rect.top];
|
52
|
-
}();
|
53
|
-
EOS
|
54
|
-
header.drag_to(target)
|
55
|
-
|
56
|
-
end_position = page.driver.evaluate_script <<-EOS
|
57
|
-
function() {
|
58
|
-
var ele = jQuery(".dialog")[0];
|
59
|
-
var rect = ele.getBoundingClientRect();
|
60
|
-
return [rect.left, rect.top];
|
61
|
-
}();
|
62
|
-
EOS
|
63
|
-
|
64
|
-
expect(start_position).to_not eq(end_position)
|
65
|
-
end
|
66
|
-
|
67
|
-
scenario "Ajaxbox without modality (background is clickable)" do
|
68
|
-
node = create(:home_page_node, name: "MyNode")
|
69
|
-
node_path = edit_admin_node_path(node)
|
70
|
-
visit node_path
|
71
|
-
open_toolbox_dialog "Add child"
|
72
|
-
|
73
|
-
expect(page).to have_css(".mfp-bg")
|
74
|
-
page.driver.click(10, 10)
|
75
|
-
expect(page).to_not have_css(".mfp-bg")
|
76
|
-
end
|
77
|
-
|
78
|
-
scenario "Ajaxbox with modality (background is not clickable)" do
|
79
|
-
user = Releaf::Permissions::User.last
|
80
|
-
visit releaf_permissions_users_path
|
81
|
-
click_link user.name
|
82
|
-
expect(page).to have_header(text: user.releaf_title)
|
83
|
-
open_toolbox_dialog "Delete"
|
84
|
-
|
85
|
-
expect(page).to have_css(".mfp-bg")
|
86
|
-
page.driver.click(10, 10)
|
87
|
-
expect(page).to have_css(".mfp-bg")
|
88
|
-
expect(find(".mfp-bg")).to be_visible
|
89
|
-
end
|
90
|
-
|
91
|
-
scenario "Ajaxbox single image view" do
|
92
|
-
image = Rack::Test::UploadedFile.new(File.expand_path('../../spec/fixtures/unicorn.jpg', __dir__), "image/jpg")
|
93
|
-
book = create(:book, cover_image: image)
|
94
|
-
visit edit_admin_book_path(book)
|
95
|
-
|
96
|
-
find(".field[data-name='cover_image'] .value-preview img").click
|
97
|
-
expect(page).to have_css(".mfp-bg")
|
98
|
-
page.driver.click(10, 10)
|
99
|
-
expect(page).to_not have_css(".mfp-bg")
|
100
|
-
|
101
|
-
find(".field[data-name='cover_image'] .value-preview img").click
|
102
|
-
|
103
|
-
image_url = find(".field[data-name='cover_image'] .value-preview a.ajaxbox")["href"] + "&ajax=1"
|
104
|
-
ajaxbox_image_selector = '.ajaxbox-inner img.mfp-img'
|
105
|
-
expect(find(ajaxbox_image_selector)['src']).to eq image_url
|
106
|
-
|
107
|
-
find(".ajaxbox-inner button.close").click
|
108
|
-
expect(page).to have_no_css(".mfp-bg")
|
109
|
-
expect(page).to have_no_css(ajaxbox_image_selector)
|
110
|
-
end
|
111
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
feature "Authorization" do
|
3
|
-
let(:user){ create(:user) }
|
4
|
-
|
5
|
-
scenario "Url preserving after authorization" do
|
6
|
-
current_unauthorized_url = new_admin_book_url
|
7
|
-
visit current_unauthorized_url
|
8
|
-
|
9
|
-
within("form") do
|
10
|
-
fill_in 'Email', with: user.email
|
11
|
-
fill_in 'Password', with: user.password
|
12
|
-
click_button 'Sign in'
|
13
|
-
end
|
14
|
-
|
15
|
-
expect(current_url).to eq current_unauthorized_url
|
16
|
-
end
|
17
|
-
|
18
|
-
scenario "Redirection to role default controller after authorization" do
|
19
|
-
visit releaf_root_url
|
20
|
-
within("form.login") do
|
21
|
-
fill_in 'Email', with: user.email
|
22
|
-
fill_in 'Password', with: user.password
|
23
|
-
click_button 'Sign in'
|
24
|
-
end
|
25
|
-
|
26
|
-
expect(current_url).to eq url_for(action: 'index', controller: '/' + user.role.default_controller)
|
27
|
-
end
|
28
|
-
|
29
|
-
scenario "Redirection to role :redirect_to GET parameter after authorization when parameter value is relative url" do
|
30
|
-
visit new_releaf_permissions_user_session_url(redirect_to: new_admin_book_path)
|
31
|
-
within("form.login") do
|
32
|
-
fill_in 'Email', with: user.email
|
33
|
-
fill_in 'Password', with: user.password
|
34
|
-
click_button 'Sign in'
|
35
|
-
end
|
36
|
-
|
37
|
-
expect(current_url).to eq new_admin_book_url
|
38
|
-
end
|
39
|
-
|
40
|
-
scenario "Redirection to role default controller after authorization when :redirect_to GET parameter is absolute url" do
|
41
|
-
visit new_releaf_permissions_user_session_url(redirect_to: new_admin_book_url)
|
42
|
-
within("form.login") do
|
43
|
-
fill_in 'Email', with: user.email
|
44
|
-
fill_in 'Password', with: user.password
|
45
|
-
click_button 'Sign in'
|
46
|
-
end
|
47
|
-
|
48
|
-
expect(current_url).to eq url_for(action: 'index', controller: '/' + user.role.default_controller)
|
49
|
-
end
|
50
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
feature "Breadcrumbs", js: true do
|
3
|
-
background do
|
4
|
-
auth_as_user
|
5
|
-
end
|
6
|
-
|
7
|
-
scenario "Open show view with link to resource show in breadcrumbs" do
|
8
|
-
banner = Banner.create(url: "https://google.com")
|
9
|
-
visit admin_banner_path(banner)
|
10
|
-
|
11
|
-
within ".breadcrumbs" do
|
12
|
-
expect(page).to have_css("li:last-child", text: "https://google.com")
|
13
|
-
expect(page).to have_link("https://google.com", href: admin_banner_path(banner))
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
feature "Dragonfly integration", js: true do
|
3
|
-
background do
|
4
|
-
auth_as_user
|
5
|
-
end
|
6
|
-
|
7
|
-
scenario "Upload, view and remove image" do
|
8
|
-
visit new_admin_book_path
|
9
|
-
create_resource do
|
10
|
-
fill_in "Title", with: "xx"
|
11
|
-
attach_file "Cover image", File.expand_path('../fixtures/cs.png', __dir__)
|
12
|
-
end
|
13
|
-
|
14
|
-
find(".field[data-name='cover_image'] a.ajaxbox" ).click
|
15
|
-
expect(page).to have_css(".ajaxbox-inner img.mfp-img")
|
16
|
-
find(".ajaxbox-inner button.close" ).click
|
17
|
-
expect(page).to have_no_css(".ajaxbox-inner img.mfp-img")
|
18
|
-
|
19
|
-
update_resource do
|
20
|
-
check "Remove"
|
21
|
-
end
|
22
|
-
expect(page).to have_no_css(".field[data-name='cover_image'] a.ajaxbox")
|
23
|
-
end
|
24
|
-
end
|
@@ -1,186 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
feature "Base controller edit", js: true do
|
3
|
-
background do
|
4
|
-
auth_as_user
|
5
|
-
@author = FactoryGirl.create(:author)
|
6
|
-
@good_book = FactoryGirl.create(:book, title: "good book", author: @author, price: 12.34, description_lv: "in lv", description_en: "in en")
|
7
|
-
FactoryGirl.create(:book, title: "bad book", author: @author)
|
8
|
-
end
|
9
|
-
|
10
|
-
scenario "creation of new resources" do
|
11
|
-
|
12
|
-
# normal save button redirects to edit view of the newly created resource
|
13
|
-
visit admin_books_path
|
14
|
-
click_link "Create new resource"
|
15
|
-
wait_for_all_richtexts
|
16
|
-
fill_in "Title", with: "Lorem ipsum"
|
17
|
-
click_button 'Save'
|
18
|
-
expect(page).to have_css('body > .notifications .notification[data-id="resource_status"][data-type="success"]', text: "Create succeeded")
|
19
|
-
wait_for_all_richtexts
|
20
|
-
expect(page).to have_css('header h1', text: 'Lorem ipsum')
|
21
|
-
|
22
|
-
# "save and create another" button redirects to new resource view
|
23
|
-
visit new_admin_book_path
|
24
|
-
wait_for_all_richtexts
|
25
|
-
fill_in "Title", with: "Other ipsum"
|
26
|
-
click_button "Save and create another"
|
27
|
-
expect(page).to have_css('body > .notifications .notification[data-id="resource_status"][data-type="success"]', text: "Create succeeded")
|
28
|
-
wait_for_all_richtexts
|
29
|
-
expect(current_path).to eq new_admin_book_path
|
30
|
-
expect(page).to have_css('header h1', text: 'Create new resource')
|
31
|
-
|
32
|
-
# ENTER key in a field defaults to "save and create another"
|
33
|
-
visit new_admin_book_path
|
34
|
-
wait_for_all_richtexts
|
35
|
-
fill_in "Title", with: "Another ipsum"
|
36
|
-
find('#resource_title').native.send_key(:Enter)
|
37
|
-
expect(page).to have_css('body > .notifications .notification[data-id="resource_status"][data-type="success"]', text: "Create succeeded")
|
38
|
-
expect(page).to have_css('header h1', text: 'Create new resource')
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
scenario "keeps search params after deleting record from edit view" do
|
43
|
-
visit admin_books_path(search: "good")
|
44
|
-
click_link("good book")
|
45
|
-
open_toolbox_dialog("Delete")
|
46
|
-
click_button("Yes")
|
47
|
-
expect(page).to have_number_of_resources(0)
|
48
|
-
end
|
49
|
-
|
50
|
-
scenario "when deleting item with restrict relation" do
|
51
|
-
visit edit_admin_author_path @author
|
52
|
-
open_toolbox_dialog("Delete")
|
53
|
-
|
54
|
-
within_dialog do
|
55
|
-
expect(page).to have_css('.restricted-relations .relations li', count: 2)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
scenario "drag and drop nested items with ckeditors" do
|
60
|
-
skip "implement drag and drop test"
|
61
|
-
end
|
62
|
-
|
63
|
-
scenario "when clicking on delete restriction relation, it opens edit for related object" do
|
64
|
-
visit edit_admin_author_path @author
|
65
|
-
open_toolbox_dialog("Delete")
|
66
|
-
|
67
|
-
within_dialog do
|
68
|
-
find('.restricted-relations .relations li a', text: "good book").click
|
69
|
-
end
|
70
|
-
expect(page).to have_header(text: "good book")
|
71
|
-
end
|
72
|
-
|
73
|
-
scenario "remember last active locale for localized fields" do
|
74
|
-
visit admin_book_path(id: @good_book.id)
|
75
|
-
within(".localization-switch") do
|
76
|
-
click_button "en"
|
77
|
-
end
|
78
|
-
|
79
|
-
within(".localization-menu-items") do
|
80
|
-
click_button "Lv"
|
81
|
-
end
|
82
|
-
wait_for_all_richtexts
|
83
|
-
|
84
|
-
visit admin_book_path(id: @good_book.id)
|
85
|
-
expect(page).to have_css('#resource_description_lv[value="in lv"]')
|
86
|
-
end
|
87
|
-
|
88
|
-
scenario "editing book uses Book#price instead of Book[:price] (issue #95)" do
|
89
|
-
visit admin_book_path(id: @good_book.id)
|
90
|
-
expect(page).to have_css('#resource_price[value="12.34"]')
|
91
|
-
end
|
92
|
-
|
93
|
-
scenario "do not show 'Back to list' url when no index url passed" do
|
94
|
-
visit admin_books_path(search: "good")
|
95
|
-
click_link("good book")
|
96
|
-
expect(page).to have_link("Back to list")
|
97
|
-
wait_for_all_richtexts
|
98
|
-
|
99
|
-
visit admin_book_path(Book.first)
|
100
|
-
expect(page).to_not have_link("Back to list")
|
101
|
-
end
|
102
|
-
|
103
|
-
scenario "editing nested object with allow_destroy: false" do
|
104
|
-
visit admin_book_path(id: @good_book.id)
|
105
|
-
expect(page).to_not have_css('.remove-nested-item')
|
106
|
-
|
107
|
-
update_resource do
|
108
|
-
find('.nested[data-name="chapters"] .add-nested-item').click
|
109
|
-
expect(page).to have_css('.remove-nested-item')
|
110
|
-
fill_in 'resource_chapters_attributes_0_title', with: 'Chapter 1'
|
111
|
-
fill_in 'resource_chapters_attributes_0_text', with: 'todo'
|
112
|
-
fill_in_richtext 'Sample', with: "xx"
|
113
|
-
end
|
114
|
-
|
115
|
-
expect(page).to_not have_css('.remove-nested-item')
|
116
|
-
expect(page).to have_css('#resource_chapters_attributes_0_title[value="Chapter 1"]')
|
117
|
-
end
|
118
|
-
|
119
|
-
scenario "adding nested objects" do
|
120
|
-
visit new_admin_book_path
|
121
|
-
|
122
|
-
create_resource do
|
123
|
-
fill_in "Title", with: "Master and Margarita"
|
124
|
-
within "[data-name='chapters']" do
|
125
|
-
|
126
|
-
# verify that there are no visible inputs
|
127
|
-
expect( page ).to have_no_selector('input', visible: true)
|
128
|
-
expect( page ).to have_no_selector('textarea', visible: true)
|
129
|
-
|
130
|
-
click_button "Add item"
|
131
|
-
|
132
|
-
fill_in "Title", with: "Chapter 1"
|
133
|
-
fill_in "Text", with: "some text"
|
134
|
-
fill_in_richtext 'Sample', with: "xx"
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
new_book = Book.where(title: "Master and Margarita").first
|
139
|
-
expect( new_book.chapters.count ).to eq 1
|
140
|
-
expect( new_book.chapters.first.title ).to eq "Chapter 1"
|
141
|
-
end
|
142
|
-
|
143
|
-
scenario "using datetime picker widget" do
|
144
|
-
visit new_admin_book_path
|
145
|
-
|
146
|
-
create_resource do
|
147
|
-
fill_in "Title", with: "Mustard and Margarine"
|
148
|
-
expect(page).to have_css('.field.type-datetime[data-name="published_at"] input.hasDatepicker')
|
149
|
-
expect(find_field('Published at').value).to eq ''
|
150
|
-
expect(page.document).to have_no_css '#ui-datepicker-div'
|
151
|
-
find('label', text: 'Published at').click
|
152
|
-
within page.document.find('#ui-datepicker-div') do
|
153
|
-
find('.ui-datepicker-month option', text: 'Apr').select_option
|
154
|
-
find('.ui-datepicker-year option', text: '2018').select_option
|
155
|
-
date_cell_selector = '.ui-datepicker-calendar tbody td[data-month="3"][data-year="2018"]'
|
156
|
-
find(date_cell_selector, text: '20').click
|
157
|
-
expect(page).to have_css("#{date_cell_selector}.ui-datepicker-current-day", text: '20')
|
158
|
-
|
159
|
-
find('.ui_tpicker_hour select option', text: '23').select_option
|
160
|
-
find('.ui_tpicker_minute select option', text: '45').select_option
|
161
|
-
expect(page).to have_no_css('.ui_tpicker_second select')
|
162
|
-
expect(page).to have_no_css('.ui_tpicker_millisec select')
|
163
|
-
expect(page).to have_no_css('.ui_tpicker_timezone select')
|
164
|
-
click_on 'Done'
|
165
|
-
end
|
166
|
-
expect(page.document).to have_no_css '#ui-datepicker-div'
|
167
|
-
expect(find_field('Published at').value).to eq '2018-04-20 23:45'
|
168
|
-
end
|
169
|
-
|
170
|
-
visit admin_books_path
|
171
|
-
expect(page).to have_css 'tr', text: /\AMustard and Margarine No 2018-04-20 23:45\z/
|
172
|
-
click_on "Mustard and Margarine"
|
173
|
-
expect(find_field('Published at').value).to eq '2018-04-20 23:45'
|
174
|
-
find('label', text: 'Published at').click
|
175
|
-
within page.document.find('#ui-datepicker-div') do
|
176
|
-
expect(find('select.ui-datepicker-month option:checked').text).to eq 'Apr'
|
177
|
-
expect(find('select.ui-datepicker-year option:checked').text).to eq '2018'
|
178
|
-
expect(page).to have_css('.ui-datepicker-calendar tbody td[data-month="3"][data-year="2018"].ui-datepicker-current-day', text: '20')
|
179
|
-
|
180
|
-
expect(find('.ui_tpicker_hour select option:checked').text).to eq '23'
|
181
|
-
expect(find('.ui_tpicker_minute select option:checked').text).to eq '45'
|
182
|
-
end
|
183
|
-
|
184
|
-
end
|
185
|
-
|
186
|
-
end
|