Skip to content

Commit

Permalink
Add more content item tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto committed Sep 21, 2018
1 parent 6d263f2 commit ae42731
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Library DebugLibrary
Library RequestsLibrary
Library SeleniumLibrary timeout=30 implicit_wait=0

Variables variables.py

*** Variables ***

${FIXTURE} plone.app.robotframework.testing.PLONE_ROBOT_TESTING
Expand Down
Binary file added tests/pixel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 53 additions & 2 deletions tests/test_content.robot
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,36 @@ Scenario: As a site administrator I can add a text tile to a page
# # Then I should see a notification that 'My Page' has been created
and I should see 'My text tile' on the page view

Scenario: As a site administrator I can add a news item
Scenario: As a site administrator I can add a News Item
Given a logged in site-administrator
and the Plone site root
When I add a News Item with the title 'My News Item'
# Then I should see a notification that 'My Page' has been created
and I should see 'My News Item' in the navigation

# XXX: Event is broken in Plone-React
# Scenario: As a site administrator I can add an Event
# Given a logged in site-administrator
# and the Plone site root
# When I add an Event with the title 'My Event'
# # Then I should see a notification that 'My Page' has been created
# and I should see 'My Event' in the navigation

Scenario: As a site administrator I can add a Folder
Given a logged in site-administrator
and the Plone site root
When I add a Folder with the title 'My Folder'
# Then I should see a notification that 'My Page' has been created
and I should see 'My Folder' in the navigation

Scenario: As a site administrator I can add a File
Given a logged in site-administrator
and the Plone site root
When I add a File with the title 'My File'
# Then I should see a notification that 'My Page' has been created
and I should see 'My File' in the navigation


*** Keywords ***


Expand Down Expand Up @@ -63,7 +86,35 @@ I add a News Item with the title '${title}'
Wait until page contains element css=#toolbar-add-news-item
Click element css=#toolbar-add-news-item
Wait until page contains element name=title
Input text name=title My News Item
Input text name=title ${title}
Click element css=*[title=Save]

I add an Event with the title '${title}'
Wait until page contains element css=#toolbar-add
Click element css=#toolbar-add
Wait until page contains element css=#toolbar-add-event
Click element css=#toolbar-add-event
Wait until page contains element name=title
Input text name=title ${title}
Click element css=*[title=Save]

I add a Folder with the title '${title}'
Wait until page contains element css=#toolbar-add
Click element css=#toolbar-add
Wait until element is visible css=#toolbar-add-folder
Click element css=#toolbar-add-folder
Wait until page contains element name=title
Input text name=title ${title}
Click element css=*[title=Save]

I add a File with the title '${title}'
Wait until page contains element css=#toolbar-add
Click element css=#toolbar-add
Wait until element is visible css=#toolbar-add-file
Click element css=#toolbar-add-file
Wait until page contains element name=title
Input text name=title ${title}
Choose File name=file ${PATH_TO_TEST_FILES}/pixel.png
Click element css=*[title=Save]


Expand Down
4 changes: 4 additions & 0 deletions tests/variables.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
import os

PATH_TO_TEST_FILES = os.path.join(os.path.dirname(__file__)) # noqa

0 comments on commit ae42731

Please sign in to comment.