diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-08-01 12:31:13 -0500 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-08-01 12:31:13 -0500 |
commit | 84b6c7a5f3bf3d6f96331d73225903d3fd92b4e2 (patch) | |
tree | 9cf524013fb1d488528aaa3fd831e253cee850ff /spec/features/projects/wiki | |
parent | 536ebecf7eec95bd2cc1b542f1c35d70f814731e (diff) | |
download | gitlab-ce-84b6c7a5f3bf3d6f96331d73225903d3fd92b4e2.tar.gz |
Revert "Merge branch 'mh/editor-indents' into 'master'"revert-editor-indents
This reverts commit 28f2225bdfee4d353f07a766c6c8b29ba6181397, reversing
changes made to 96ae5bd83da31350e9856a290127d7aa1469710a.
Diffstat (limited to 'spec/features/projects/wiki')
-rw-r--r-- | spec/features/projects/wiki/user_creates_wiki_page_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb index 1080976f7ce..cc6dbaa6eb8 100644 --- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb @@ -134,15 +134,9 @@ describe "User creates wiki page" do fill_in(:wiki_content, with: ascii_content) - # This is the dumbest bug in the world: - # When the #wiki_content textarea is filled in, JS captures the `Enter` keydown event in order to do - # auto-indentation and manually inserts a newline. However, for whatever reason, when you try to click on the - # submit button in Capybara, it will not trigger the `click` event if a \n or \r character has been manually - # added to the textarea. It will, however, trigger ALL OTHER EVENTS, including `mouseover`/down/up, focus, and - # blur. Just not `click`. But only when you manually insert \n or \r - if you manually insert any other sequence - # then `click` is fired normally. And it's only Capybara. Browsers and JSDOM don't have this issue. - # So that's why the next line performs the click via JS. - page.execute_script("document.querySelector('.rspec-create-page-button').click()") + page.within(".wiki-form") do + click_button("Create page") + end page.within ".md" do expect(page).to have_selector(".katex", count: 3).and have_content("2+2 is 4") |