Skip to content
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

Port robot test #394

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/393.tests
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
port robot tests [1letter]
51 changes: 31 additions & 20 deletions plone/app/dexterity/tests/robot/test_types.robot
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
*** Settings *****************************************************************
*** Settings ***

Resource plone/app/robotframework/keywords.robot
Resource plone/app/robotframework/saucelabs.robot
Resource plone/app/robotframework/selenium.robot
Resource plone/app/robotframework/browser.robot

Library Remote ${PLONE_URL}/RobotRemote
Library Remote ${PLONE_URL}/RobotRemote

Test Setup Run Keywords Plone test setup
Test Teardown Run keywords Plone test teardown
Test Setup Run Keywords Plone test setup
Test Teardown Run keywords Plone test teardown


*** Test cases ***************************************************************
*** Test cases ***

Scenario: type title is normalized
Given a logged in manager
When adding a new content type
and type title is Boîte à outils
Then type id should become boite_a_outils
Given a site owner
When adding a new content type
and type title is Boîte à outils
Then type id should become boite_a_outils


*** Keywords *****************************************************************
*** Keywords ***

# Given

a site owner

Enable autologin as Manager

# When

adding a new content type
Go to ${PLONE_URL}/@@dexterity-types
Click Overlay Button Add New Content Type…

Go to ${PLONE_URL}/@@dexterity-types
Click "Add New Content Type…"

# Then

type title is
[Arguments] ${title}
Input text form-widgets-title ${title}
[Arguments] ${title}

Fill text //input[@id="form-widgets-title"] ${title}

type id should become
[Arguments] ${id}
Set Focus To Element form-widgets-id
Wait until keyword succeeds 10 1 Textfield Value Should Be form-widgets-id ${id}
[Arguments] ${id}

Focus id=form-widgets-id
Get text //input[@id="form-widgets-id"] should be ${id}