Skip to content

A platform for community discussion. Free, open, simple.

DEV: Restore two prosemirror specs (#39637)

Jarek Radosz3220b24ca32f
diff --git a/spec/system/composer/prosemirror_code_spec.rb b/spec/system/composer/prosemirror_code_spec.rb
index f8bc6401d9f..03aa8de97f0 100644
--- a/spec/system/composer/prosemirror_code_spec.rb
+++ b/spec/system/composer/prosemirror_code_spec.rb
@@ -232,12 +232,13 @@ describe "Composer - ProseMirror - Code formatting" do
expect(composer).to have_value("This is ~~SPARTA!~~ `code!`.")
end
- xit "allows typing before a code mark with/without the mark" do
+ it "allows typing before a code mark with/without the mark" do
open_composer
composer.type_content("`code mark`")
expect(rich).to have_css("code", text: "code mark")
# before the code mark
composer.send_keys(SystemHelpers::LINE_START_KEY)
+ wait_for_timeout
composer.send_keys(:left)
composer.type_content("..")
# within the code mark
diff --git a/spec/system/composer/prosemirror_pasting_spec.rb b/spec/system/composer/prosemirror_pasting_spec.rb
index 07f2b96c4fd..654dce98c77 100644
--- a/spec/system/composer/prosemirror_pasting_spec.rb
+++ b/spec/system/composer/prosemirror_pasting_spec.rb
@@ -87,13 +87,13 @@ describe "Composer - ProseMirror - Pasting content" do
)
end
- xit "ignores text/html content if Files are present" do
+ it "ignores text/html content if Files are present" do
open_composer
- paste_and_click_image(cdp)
- expect(rich).to have_css("img[data-orig-src]", count: 1)
+ paste_and_click_image
+ expect(rich).to have_no_css("img[src^='data:']")
composer.focus # making sure the toggle click won't be captured as a double click
composer.toggle_rich_editor
- expect(composer).to have_value("![image|244x66](upload://hGLky57lMjXvqCWRhcsH31ShzmO.png)")
+ expect(composer).to have_value(%r{\A!\[image\|244x66\]\(upload://\w+\.png\)\z})
end
it "handles multiple data URI images pasted simultaneously" do