Skip to content

Commit

Permalink
Adding images in robot test
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Jul 3, 2015
1 parent ba28c6d commit ef49dde
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sc/photogallery/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def setUpZope(self, app, configurationContext):
import ftw.zipexport
self.loadZCML(package=ftw.zipexport)

import collective.js.cycle2
self.loadZCML(package=collective.js.cycle2)

import sc.photogallery
self.loadZCML(package=sc.photogallery)

Expand All @@ -68,6 +71,8 @@ def setUpPloneSite(self, portal):
if HAS_ZIPEXPORT:
self.applyProfile(portal, 'ftw.zipexport:default')

self.applyProfile(portal, 'collective.js.cycle2:default')

self.applyProfile(portal, 'sc.photogallery:default')

if PLONE_VERSION >= '5.0':
Expand Down
42 changes: 42 additions & 0 deletions src/sc/photogallery/tests/test_photogallery.robot
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,48 @@ Create
Click Button Save
Page Should Contain Item created

# Adding some images
Open Add New Menu
Click Link css=a#image
Page Should Contain Add Image
Choose File css=#image_file /tmp/640px-Mandel_zoom_00_mandelbrot_set.jpg
Click Button Save
Page Should Contain Changes saved

Click Link link=${title}
Open Add New Menu
Click Link css=a#image
Page Should Contain Add Image
Choose File css=#image_file /tmp/640px-Mandel_zoom_04_seehorse_tail.jpg
Click Button Save
Page Should Contain Changes saved

Click Link link=${title}
Open Add New Menu
Click Link css=a#image
Page Should Contain Add Image
Choose File css=#image_file /tmp/640px-Mandel_zoom_06_double_hook.jpg
Click Button Save
Page Should Contain Changes saved

Click Link link=${title}
Open Add New Menu
Click Link css=a#image
Page Should Contain Add Image
Choose File css=#image_file /tmp/640px-Mandel_zoom_07_satellite.jpg
Click Button Save
Page Should Contain Changes saved

Click Link link=${title}
Open Add New Menu
Click Link css=a#image
Page Should Contain Add Image
Choose File css=#image_file /tmp/640px-Mandel_zoom_12_satellite_spirally_wheel_with_julia_islands.jpg
Click Button Save
Page Should Contain Changes saved

Click Link link=${title}

Update
[arguments] ${title} ${description}

Expand Down

0 comments on commit ef49dde

Please sign in to comment.