-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config with default template 5d22fbf8 #166
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f19892f
update config with plone/meta
1letter 5ea7efb
Update config
1letter f26a700
Fix attribute rendering "multiple" in orderselect widget
1letter 5fff65d
add robot test
1letter 0acddfb
run lint
1letter 9e99cf4
remove attribute from template
1letter 759181d
Fix attribute rendering "multiple" in orderselect widget
1letter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,78 @@ | ||
*** Settings *** | ||
|
||
Resource plone/app/robotframework/browser.robot | ||
|
||
Library Remote ${PLONE_URL}/RobotRemote | ||
Library Collections | ||
|
||
Test Setup Run Keywords Plone test setup | ||
Test Teardown Run keywords Plone test teardown | ||
|
||
|
||
*** Variables *** | ||
|
||
${TITLE} An edited page | ||
${PAGE_ID} an-edited-page | ||
|
||
|
||
*** Test Cases *** | ||
|
||
Scenario: As a manager I can add a taxonomy | ||
Given a logged in manager | ||
and an page type with a taxonomy | ||
When I edit the page | ||
and I select multiple options | ||
Then I see '2' selected options | ||
|
||
When I save the page | ||
and I edit the page | ||
and I deselect option 'Information Science' | ||
Then I see '1' selected options | ||
|
||
*** Keywords *** | ||
|
||
# Given | ||
|
||
a logged in manager | ||
Enable autologin as Manager | ||
|
||
an page type with a taxonomy | ||
Create content | ||
... type=Document | ||
... title=${TITLE} | ||
|
||
Go to ${PLONE_URL}/dexterity-types/Document/@@behaviors | ||
Check Checkbox //input[@name="form.widgets.collective.taxonomy.generated.test:list"] | ||
Click //button[@name="form.buttons.apply"] | ||
Wait For Condition Text //body contains Behaviors successfully updated. | ||
|
||
# When | ||
I edit the page | ||
Go to ${PLONE_URL}/${PAGE_ID}/edit | ||
Get Text //body contains Edit Page | ||
|
||
I select multiple options | ||
Select Options By //select[@name="form.widgets.test.taxonomy_test.from"] index 0 2 | ||
Click //button[@name="from2toButton"] | ||
|
||
I save the page | ||
Click //button[@name="form.buttons.save"] | ||
Wait For Condition Text //body contains Changes saved | ||
|
||
I deselect option '${label}' | ||
Select Options By //select[@name="form.widgets.test.taxonomy_test.to"] label ${label} | ||
Click //button[@name="to2fromButton"] | ||
|
||
# Then | ||
I see '${count}' selected options | ||
Get Element Count //select[@name="form.widgets.test.taxonomy_test.to"]/option should be ${count} | ||
|
||
# Misc | ||
|
||
Pause | ||
[Documentation] Visually pause test execution with interactive dialog by | ||
... importing **Dialogs**-library and calling its | ||
... **Pause Execution**-keyword. | ||
Import library Dialogs | ||
Pause execution | ||
|
105 changes: 0 additions & 105 deletions
105
src/collective/taxonomy/tests/robot/todo_test_taxonomy.robot
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions:
to
field?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I see now that the
multiple
attribute is set intal:attributes
so its OK to remove it from the markup.But TBH it smells a bit like a bug in Chameleon template rendering engine, because if I do
multiple=""
in the widget markup it gets replaced correctly withmultiple="multiple"
(thats whatz3c.form OrderedSelect
widget defines here: https://github.com/zopefoundation/z3c.form/blob/master/src/z3c/form/browser/orderedselect.py#L36) -> but according to the specs, those "boolean html attributes" should be handled correctly if they are present without a value (https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML)So if you remove the second multiple in the
to
field too, this is approved.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related 😉
collective/zpretty#123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, a new task for the week ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root cause: malthe/chameleon#429