Skip to content

Commit

Permalink
Merge pull request #121 from plone/robottest-fix-modal-link
Browse files Browse the repository at this point in the history
Wait for opened modal in robottests
  • Loading branch information
petschki authored Oct 21, 2024
2 parents b786750 + 0368d8f commit d481cc1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions plone/schemaeditor/tests/robot/test_fields.robot
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ I add a new Content Type
[Arguments] ${CONTENT_TYPE_NAME} ${CONTENT_TYPE_ID}
[Documentation] Add a new dexterity content type
Click //article[@id="content"]//button[contains(text(),'Add New Content Type…')]
Click Modal Link //article[@id="content"]//button[contains(text(),'Add New Content Type…')]
Type Text //input[@name="form.widgets.title"] ${CONTENT_TYPE_NAME}
Focus //input[@name="form.widgets.id"]
Get Text //input[@name="form.widgets.id"] should be ${CONTENT_TYPE_ID}
Expand All @@ -143,7 +143,7 @@ I add a new field
[Arguments] ${FIELD_LABEL} ${FIELD_ID} ${FIELD_TYPE}
[Documentation] Add field in current dexterity content type
Click //a[@id="add-field"]
Click Modal Link //a[@id="add-field"]
Type Text //input[@name="form.widgets.title"] ${FIELD_LABEL}
Focus //input[@name="form.widgets.__name__"]
Get Text //input[@name="form.widgets.__name__"] should be ${FIELD_ID}
Expand All @@ -157,7 +157,7 @@ I add a new fieldset
[Arguments] ${FIELDSET_LABEL} ${FIELDSET_ID}
[Documentation] Add fieldset in current dexterity content type
Click //a[@id="add-fieldset"]
Click Modal Link //a[@id="add-fieldset"]
Type Text //input[@name="form.widgets.label"] ${FIELDSET_LABEL}
Focus //input[@name="form.widgets.__name__"]
Get Property //input[@name="form.widgets.__name__"] value should be ${FIELDSET_ID}
Expand All @@ -166,13 +166,13 @@ I add a new fieldset

I configure the language field

Click //div[@data-field_id="languages"]//a[contains(text(),'Settings…')]
Click Modal Link //div[@data-field_id="languages"]//a[contains(text(),'Settings…')]
Select Options By //select[@name="form.widgets.vocabularyName:list"] value plone.app.vocabularies.AvailableContentLanguages
Click //div[contains(@class,"modal-footer")]//button[@id="form-buttons-save"]

I configure the hobbies field

Click //div[@data-field_id="hobbies"]//a[contains(text(),'Settings…')]
Click Modal Link //div[@data-field_id="hobbies"]//a[contains(text(),'Settings…')]
Type Text //textarea[@name="form.widgets.values"] Chess clear=False
Press Keys //textarea[@name="form.widgets.values"] Enter
Type Text //textarea[@name="form.widgets.values"] Soccer clear=False
Expand All @@ -185,7 +185,7 @@ I configure the hobbies field

I configure the hobbies field with wrong values

Click //div[@data-field_id="hobbies"]//a[contains(text(),'Settings…')]
Click Modal Link //div[@data-field_id="hobbies"]//a[contains(text(),'Settings…')]
Type Text //textarea[@name="form.widgets.values"] Chess clear=False
Press Keys //textarea[@name="form.widgets.values"] Enter
Type Text //textarea[@name="form.widgets.values"] Soccer clear=False
Expand Down Expand Up @@ -248,3 +248,9 @@ the field is removed
[Arguments] ${FIELD_ID}

Get Element Count //div[@data-field_id="${FIELD_ID}"] should be 0


Click Modal Link
[Arguments] ${SELECTOR}
Click ${SELECTOR}
Wait For Elements State //div[contains(@class, "modal-body")]//form[@id] visible timeout=2s

0 comments on commit d481cc1

Please sign in to comment.