Skip to content

Commit

Permalink
Merge pull request #394 from plone/port-robot-test
Browse files Browse the repository at this point in the history
Port robot test
  • Loading branch information
petschki authored Oct 18, 2024
2 parents d519d3f + a9557e6 commit 3ebb636
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
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}

0 comments on commit 3ebb636

Please sign in to comment.