Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scayt on startup image2 dialog
- Loading branch information
Showing
10 changed files
with
226 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<metadata> | ||
<version>0001</version> | ||
<dependencies> | ||
<dependency>profile-collective.ckeditor:testing</dependency> | ||
</dependencies> | ||
</metadata> |
12 changes: 12 additions & 0 deletions
12
src/collective/ckeditor/profiles/testing_image2/propertiestool.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" ?> | ||
<object name="portal_properties" meta_type="Plone Properties Tool"> | ||
<object name="ckeditor_properties" meta_type="Plone Property Sheet" purge="False"> | ||
<property name="removePlugins" type="lines"> | ||
<element value="image"/> | ||
</property> | ||
<property name="plugins" type="lines"> | ||
<element value="ajaxsave;/++resource++cke_ajaxsave/plugin.js"/> | ||
<element value="image2;/++resource++ckeditor/plugins/image2/plugin.js"/> | ||
</property> | ||
</object> | ||
</object> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<metadata> | ||
<version>0001</version> | ||
<dependencies> | ||
<dependency>profile-collective.ckeditor:testing</dependency> | ||
</dependencies> | ||
</metadata> |
6 changes: 6 additions & 0 deletions
6
src/collective/ckeditor/profiles/testing_scayt/propertiestool.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" ?> | ||
<object name="portal_properties" meta_type="Plone Properties Tool"> | ||
<object name="ckeditor_properties" meta_type="Plone Property Sheet" purge="False"> | ||
<property name="enableScaytOnStartup" type="boolean">True</property> | ||
</object> | ||
</object> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
*** Settings *** | ||
|
||
Library collective.ckeditor.tests.keyword.TestKeywords | ||
|
||
Resource plone/app/robotframework/keywords.robot | ||
Resource plone/app/robotframework/selenium.robot | ||
Resource plone/app/robotframework/saucelabs.robot | ||
|
||
Library Remote ${PLONE_URL}/RobotRemote | ||
Library plone.app.robotframework.keywords.Debugging | ||
|
||
Test Setup Open SauceLabs test browser | ||
Test Teardown Run keywords Report test status Close all browsers | ||
|
||
*** Test cases *** | ||
|
||
Scenario: Uses image2 editor | ||
Given a logged-in editor | ||
and a document | ||
When I edit the document | ||
Then CKEditor uses image2 editor | ||
|
||
*** Keywords ***************************************************************** | ||
|
||
# --- GIVEN ------------------------------------------------------------------ | ||
|
||
a logged-in editor | ||
Enable autologin as Editor Contributor | ||
|
||
a document | ||
Create content type=Document id=document-to-edit title=Document to edit text=<p id="p1">paragraph1</p><p id="p2">paragraph2</p><p>paragraph3</p><p>paragraph4</p> | ||
Go to ${PLONE_URL}/document-to-edit | ||
Page Should Contain paragraph1 | ||
Page Should Contain paragraph4 | ||
Page Should Contain Element css=#p1 | ||
Page Should Not Contain Element css=#p1 strong | ||
|
||
# --- WHEN ------------------------------------------------------------------- | ||
|
||
I edit the document | ||
Go to ${PLONE_URL}/document-to-edit/edit | ||
|
||
# --- THEN ------------------------------------------------------------------- | ||
|
||
CKEditor uses image2 editor | ||
Page Should Not Contain Element css=.cke_editor_text_dialog .cke_dialog_title | ||
Page Should Contain Element css=span.cke_button__image_icon | ||
Click Element css=span.cke_button__image_icon | ||
Wait Until Element Is Visible css=.cke_editor_text_dialog .cke_dialog_title | ||
Page Should Contain Element css=.cke_editor_text_dialog .cke_dialog_title | ||
Element should contain css=.cke_editor_text_dialog .cke_dialog_title Image Properties | ||
Element should contain css=.cke_editor_text_dialog Captioned image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
*** Settings *** | ||
|
||
Library collective.ckeditor.tests.keyword.TestKeywords | ||
|
||
Resource plone/app/robotframework/keywords.robot | ||
Resource plone/app/robotframework/selenium.robot | ||
Resource plone/app/robotframework/saucelabs.robot | ||
|
||
Library Remote ${PLONE_URL}/RobotRemote | ||
Library plone.app.robotframework.keywords.Debugging | ||
|
||
Test Setup Open SauceLabs test browser | ||
Test Teardown Run keywords Report test status Close all browsers | ||
|
||
*** Test cases *** | ||
|
||
Scenario: As an editor, CKEditor displays uncorrect spelling | ||
Given a logged-in editor | ||
and a document | ||
When I edit the document | ||
Then CKEditor shows uncorrect spelling | ||
|
||
*** Keywords ***************************************************************** | ||
|
||
# --- GIVEN ------------------------------------------------------------------ | ||
|
||
a logged-in editor | ||
Enable autologin as Editor Contributor | ||
|
||
a document | ||
Create content type=Document id=document-to-edit title=Document to edit text=<p id="p1">paragraph1</p><p id="p2">paragraph2</p><p>paragraph3</p><p>paragraph4</p> | ||
Go to ${PLONE_URL}/document-to-edit | ||
Page Should Contain paragraph1 | ||
Page Should Contain paragraph4 | ||
Page Should Contain Element css=#p1 | ||
Page Should Not Contain Element css=#p1 strong | ||
|
||
# --- WHEN ------------------------------------------------------------------- | ||
|
||
I edit the document | ||
Go to ${PLONE_URL}/document-to-edit/edit | ||
|
||
# --- THEN ------------------------------------------------------------------- | ||
|
||
CKEditor shows uncorrect spelling | ||
Select Frame css=iframe.cke_wysiwyg_frame | ||
Sleep 1s # to give time to scayt | ||
Page Should Contain Element css=#p1 .scayt-misspell-word | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
from plone.testing import layered | ||
|
||
import robotsuite | ||
import unittest | ||
|
||
from ..testing import CKEDITOR_ROBOT | ||
from ..testing import CKEDITOR_SCAYT_ROBOT | ||
from ..testing import CKEDITOR_IMAGE2_ROBOT | ||
|
||
|
||
def test_suite(): | ||
return layered( | ||
robotsuite.RobotTestSuite('robot/base.robot'), | ||
layer=CKEDITOR_ROBOT | ||
return unittest.TestSuite( | ||
[ | ||
layered( | ||
robotsuite.RobotTestSuite('robot/base.robot'), | ||
layer=CKEDITOR_ROBOT | ||
), | ||
layered( | ||
robotsuite.RobotTestSuite('robot/scayt.robot'), | ||
layer=CKEDITOR_SCAYT_ROBOT | ||
), | ||
layered( | ||
robotsuite.RobotTestSuite('robot/image2.robot'), | ||
layer=CKEDITOR_IMAGE2_ROBOT | ||
), | ||
] | ||
) |