spec: add test for rce-next preformatted format dropdown

Change-Id: Iee25e40e76273966f7b3032081004cb7c2293a3c
refs: CORE-2633
Reviewed-on: https://gerrit.instructure.com/196135
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jeremy Putnam <jeremyp@instructure.com>
This commit is contained in:
Jeremy Putnam 2019-05-31 17:01:19 -06:00
parent b8e1915c53
commit 2d4bed3c98
2 changed files with 22 additions and 0 deletions

View File

@ -222,6 +222,10 @@ module RCENextPage
f('[role="menuitemcheckbox"][title=" Small header"]')
end
def preformatted_option
f('[role="menuitemcheckbox"][title=" Preformatted"]')
end
def rce_next_toolbar
f(".tox-toolbar__primary")
end
@ -405,6 +409,10 @@ module RCENextPage
small_header_option.click
end
def click_preformatted_option
preformatted_option.click
end
def click_editor_window
editor_window.click
end

View File

@ -280,5 +280,19 @@ describe "RCE Next toolbar features" do
expect(wiki_body).to contain_css('h4')
end
end
it "should verify selecting preformatted from dropdown sets pre" do
page_title = "header"
create_wiki_page_with_text(page_title)
visit_existing_wiki_edit(@course, page_title)
select_all_wiki
click_formatting_dropdown
click_preformatted_option
in_frame tiny_rce_ifr_id do
expect(wiki_body).to contain_css('pre')
end
end
end
end