-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: plone.app.robotframework
Branch: refs/heads/master Date: 2022-08-09T17:57:30+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.robotframework@14b448f Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'. After this sleep, check that the element in question is there only once. Hopefully this will stabilize the Plone core robot tests. See plone/Products.CMFPlone#3582 Files changed: A news/3582.bugfix M src/plone/app/robotframework/selenium.robot Repository: plone.app.robotframework Branch: refs/heads/master Date: 2022-08-09T19:51:41+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.robotframework@2a85987 Add keyword 'Wait For Elements'. Here the requested element is allowed to match multiple times. Files changed: A news/3582.feature M news/3582.bugfix M src/plone/app/robotframework/selenium.robot Repository: plone.app.robotframework Branch: refs/heads/master Date: 2022-08-10T15:49:43+02:00 Author: Maurits van Rees (mauritsvanrees) <[email protected]> Commit: plone/plone.app.robotframework@12a3874 Merge pull request #140 from plone/maurits-robot-tests-sleep Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'. Files changed: A news/3582.bugfix A news/3582.feature M src/plone/app/robotframework/selenium.robot
- Loading branch information
1 parent
900cb37
commit 2d483f0
Showing
1 changed file
with
36 additions
and
14 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 |
---|---|---|
@@ -1,37 +1,59 @@ | ||
Repository: plone.schemaeditor | ||
Repository: plone.app.robotframework | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2022-08-09T17:54:25+02:00 | ||
Date: 2022-08-09T17:57:30+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.schemaeditor/commit/08a27f14d5bb666d8502423a3468c7b71d7ae278 | ||
Commit: https://github.com/plone/plone.app.robotframework/commit/14b448f287ecc7bc10766ecf7316f9a42ad6cf67 | ||
|
||
Tests: sleep before clicking button to add new content type. | ||
Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'. | ||
|
||
After this sleep, check that the element in question is there only once. | ||
Hopefully this will stabilize the Plone core robot tests. | ||
|
||
Tests fail too often here, having the modal still open after clicking this button. | ||
See https://github.com/plone/Products.CMFPlone/issues/3582 | ||
|
||
Files changed: | ||
A news/3582.bugfix | ||
M plone/schemaeditor/tests/robot/test_fields.robot | ||
M src/plone/app/robotframework/selenium.robot | ||
|
||
b"diff --git a/news/3582.bugfix b/news/3582.bugfix\nnew file mode 100644\nindex 0000000..18b766c\n--- /dev/null\n+++ b/news/3582.bugfix\n@@ -0,0 +1,4 @@\n+Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'.\n+After this sleep, check that the element in question is there only once.\n+Hopefully this will stabilize the Plone core robot tests.\n+[maurits]\ndiff --git a/src/plone/app/robotframework/selenium.robot b/src/plone/app/robotframework/selenium.robot\nindex 7d0f300..2ec4363 100644\n--- a/src/plone/app/robotframework/selenium.robot\n+++ b/src/plone/app/robotframework/selenium.robot\n@@ -102,6 +102,9 @@ Wait For Element\n Wait Until Page Contains Element ${element}\n Set Focus To Element ${element}\n Wait Until Element Is Visible ${element}\n+ Sleep 0.1\n+ ${count} = Get Element Count ${element}\n+ Should Be Equal as Numbers ${count} 1\n \n Wait For Then Click Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n@@ -115,6 +118,9 @@ Wait For Then Click Invisible Element\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n Set Focus To Element ${element}\n+ Sleep 0.1\n+ ${count} = Get Element Count ${element}\n+ Should Be Equal as Numbers ${count} 1\n Click Element ${element}\n \n # ----------------------------------------------------------------------------\n" | ||
|
||
Repository: plone.app.robotframework | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2022-08-09T19:51:41+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.robotframework/commit/2a85987a7ee47549534b038b348abd51c6defc88 | ||
|
||
Add keyword 'Wait For Elements'. | ||
|
||
Here the requested element is allowed to match multiple times. | ||
|
||
Files changed: | ||
A news/3582.feature | ||
M news/3582.bugfix | ||
M src/plone/app/robotframework/selenium.robot | ||
|
||
b'diff --git a/news/3582.bugfix b/news/3582.bugfix\nnew file mode 100644\nindex 0000000..3c745e9\n--- /dev/null\n+++ b/news/3582.bugfix\n@@ -0,0 +1,3 @@\n+Tests: sleep before clicking button to add new content type.\n+Tests fail too often here, having the modal still open after clicking this button.\n+[maurits]\ndiff --git a/plone/schemaeditor/tests/robot/test_fields.robot b/plone/schemaeditor/tests/robot/test_fields.robot\nindex 9d6f04d..ed13c2b 100644\n--- a/plone/schemaeditor/tests/robot/test_fields.robot\n+++ b/plone/schemaeditor/tests/robot/test_fields.robot\n@@ -173,6 +173,9 @@ Add content type\n Input text for sure form-widgets-title ${title}\n Set Focus to Element form-widgets-id\n Wait until keyword succeeds 10 1 Textfield Value Should Be form-widgets-id ${id}\n+ # Far too often, the overlay is not closed after clicking the add-button.\n+ # Maybe some sleep helps. Never nice to do, but better than having developers lose sleep.\n+ Sleep 0.1\n Wait For Then Click Element css=.modal-footer #form-buttons-add\n Wait overlay is closed\n Wait until page contains ${title}\n' | ||
b"diff --git a/news/3582.bugfix b/news/3582.bugfix\nindex 18b766c..262306c 100644\n--- a/news/3582.bugfix\n+++ b/news/3582.bugfix\n@@ -1,4 +1,4 @@\n-Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'.\n+Sleep in 'Wait For Element' and 'Wait For Then Click Element'.\n After this sleep, check that the element in question is there only once.\n Hopefully this will stabilize the Plone core robot tests.\n [maurits]\ndiff --git a/news/3582.feature b/news/3582.feature\nnew file mode 100644\nindex 0000000..de29e54\n--- /dev/null\n+++ b/news/3582.feature\n@@ -0,0 +1,3 @@\n+Add keyword 'Wait For Elements'.\n+Here the requested element is allowed to match multiple times.\n+[maurits]\ndiff --git a/src/plone/app/robotframework/selenium.robot b/src/plone/app/robotframework/selenium.robot\nindex 2ec4363..6c3d2b1 100644\n--- a/src/plone/app/robotframework/selenium.robot\n+++ b/src/plone/app/robotframework/selenium.robot\n@@ -98,6 +98,7 @@ Element should become visible\n \n Wait For Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n+ ... Element must match exactly one time.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n Set Focus To Element ${element}\n@@ -106,14 +107,24 @@ Wait For Element\n ${count} = Get Element Count ${element}\n Should Be Equal as Numbers ${count} 1\n \n+Wait For Elements\n+ [Documentation] Can contain css=, jquery=, or any other element selector.\n+ ... Element may match more than once.\n+ [Arguments] ${element}\n+ Wait Until Page Contains Element ${element}\n+ Set Focus To Element ${element}\n+ Wait Until Element Is Visible ${element}\n+\n Wait For Then Click Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n+ ... Element must match exactly one time.\n [Arguments] ${element}\n Wait For Element ${element}\n Click Element ${element}\n \n Wait For Then Click Invisible Element\n [Documentation] Meant for elements that are invisible, likely because they are empty.\n+ ... Element must match exactly one time.\n ... Can contain css=, jquery=, or any other element selector.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n" | ||
|
||
Repository: plone.schemaeditor | ||
Repository: plone.app.robotframework | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2022-08-10T15:49:36+02:00 | ||
Date: 2022-08-10T15:49:43+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.schemaeditor/commit/5141b1b1af48cef8cae8ebb2f05b992a4997bbff | ||
Commit: https://github.com/plone/plone.app.robotframework/commit/12a3874a298523617acbc3dc01af8408a59369b0 | ||
|
||
Merge pull request #94 from plone/maurits-robot-tests-sleep | ||
Merge pull request #140 from plone/maurits-robot-tests-sleep | ||
|
||
Tests: sleep before clicking button to add new content type. | ||
Tests: sleep in 'Wait For Element' and 'Wait For Then Click Element'. | ||
|
||
Files changed: | ||
A news/3582.bugfix | ||
M plone/schemaeditor/tests/robot/test_fields.robot | ||
A news/3582.feature | ||
M src/plone/app/robotframework/selenium.robot | ||
|
||
b'diff --git a/news/3582.bugfix b/news/3582.bugfix\nnew file mode 100644\nindex 0000000..3c745e9\n--- /dev/null\n+++ b/news/3582.bugfix\n@@ -0,0 +1,3 @@\n+Tests: sleep before clicking button to add new content type.\n+Tests fail too often here, having the modal still open after clicking this button.\n+[maurits]\ndiff --git a/plone/schemaeditor/tests/robot/test_fields.robot b/plone/schemaeditor/tests/robot/test_fields.robot\nindex 9d6f04d..ed13c2b 100644\n--- a/plone/schemaeditor/tests/robot/test_fields.robot\n+++ b/plone/schemaeditor/tests/robot/test_fields.robot\n@@ -173,6 +173,9 @@ Add content type\n Input text for sure form-widgets-title ${title}\n Set Focus to Element form-widgets-id\n Wait until keyword succeeds 10 1 Textfield Value Should Be form-widgets-id ${id}\n+ # Far too often, the overlay is not closed after clicking the add-button.\n+ # Maybe some sleep helps. Never nice to do, but better than having developers lose sleep.\n+ Sleep 0.1\n Wait For Then Click Element css=.modal-footer #form-buttons-add\n Wait overlay is closed\n Wait until page contains ${title}\n' | ||
b"diff --git a/news/3582.bugfix b/news/3582.bugfix\nnew file mode 100644\nindex 0000000..262306c\n--- /dev/null\n+++ b/news/3582.bugfix\n@@ -0,0 +1,4 @@\n+Sleep in 'Wait For Element' and 'Wait For Then Click Element'.\n+After this sleep, check that the element in question is there only once.\n+Hopefully this will stabilize the Plone core robot tests.\n+[maurits]\ndiff --git a/news/3582.feature b/news/3582.feature\nnew file mode 100644\nindex 0000000..de29e54\n--- /dev/null\n+++ b/news/3582.feature\n@@ -0,0 +1,3 @@\n+Add keyword 'Wait For Elements'.\n+Here the requested element is allowed to match multiple times.\n+[maurits]\ndiff --git a/src/plone/app/robotframework/selenium.robot b/src/plone/app/robotframework/selenium.robot\nindex 7d0f300..6c3d2b1 100644\n--- a/src/plone/app/robotframework/selenium.robot\n+++ b/src/plone/app/robotframework/selenium.robot\n@@ -98,6 +98,18 @@ Element should become visible\n \n Wait For Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n+ ... Element must match exactly one time.\n+ [Arguments] ${element}\n+ Wait Until Page Contains Element ${element}\n+ Set Focus To Element ${element}\n+ Wait Until Element Is Visible ${element}\n+ Sleep 0.1\n+ ${count} = Get Element Count ${element}\n+ Should Be Equal as Numbers ${count} 1\n+\n+Wait For Elements\n+ [Documentation] Can contain css=, jquery=, or any other element selector.\n+ ... Element may match more than once.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n Set Focus To Element ${element}\n@@ -105,16 +117,21 @@ Wait For Element\n \n Wait For Then Click Element\n [Documentation] Can contain css=, jquery=, or any other element selector.\n+ ... Element must match exactly one time.\n [Arguments] ${element}\n Wait For Element ${element}\n Click Element ${element}\n \n Wait For Then Click Invisible Element\n [Documentation] Meant for elements that are invisible, likely because they are empty.\n+ ... Element must match exactly one time.\n ... Can contain css=, jquery=, or any other element selector.\n [Arguments] ${element}\n Wait Until Page Contains Element ${element}\n Set Focus To Element ${element}\n+ Sleep 0.1\n+ ${count} = Get Element Count ${element}\n+ Should Be Equal as Numbers ${count} 1\n Click Element ${element}\n \n # ----------------------------------------------------------------------------\n" | ||
|