Adding EventsΒΆ

*** Settings ***

Resource  plone/app/robotframework/server.robot
Resource  plone/app/robotframework/keywords.robot
Resource  Selenium2Screenshots/keywords.robot

Library  OperatingSystem

Suite Setup  Run keywords  Suite Setup  Test Setup
Suite Teardown  Run keywords  Test teardown  Suite Teardown

*** Variables ***

${FIXTURE}  plone.app.robotframework.PLONE_ROBOT_TESTING
@{DIMENSIONS}  1024  768
@{APPLY_PROFILES}  plone.app.contenttypes:plone-content


*** Keywords ***

Suite Setup
    Run keyword if  not sys.argv[0].startswith('bin/robot')
    ...             Setup Plone site  ${FIXTURE}
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Open test browser
    Run keyword and ignore error  Set window size  @{DIMENSIONS}

Test Setup
    Import library  Remote  ${PLONE_URL}/RobotRemote

    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Remote ZODB SetUp  ${FIXTURE}

    ${language} =  Get environment variable  LANGUAGE  'en'
    Set default language  ${language}

    Enable autologin as  Manager
    ${user_id} =  Translate  user_id
    ...  default=jane-doe
    ${user_fullname} =  Translate  user_fullname
    ...  default=Jane Doe
    Create user  ${user_id}  Member  fullname=${user_fullname}
    Set autologin username  ${user_id}

Test Teardown
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Remote ZODB TearDown  ${FIXTURE}

Suite Teardown
    Run keyword if  not sys.argv[0].startswith('bin/robot')
    ...             Teardown Plone Site
    Run keyword if  sys.argv[0].startswith('bin/robot')
    ...             Close all browsers

Plone web sites have a built-in system for managing and showing calendar events.

Use the Add new... menu for a folder to add an event:

add-new-menu.png

Select Event from the drop-down menu, and you’ll see the rather large Add Event panel:

Adding events form

From the top, we have the following fields:

  • Title - REQUIRED
  • Summary
  • Event starts - REQUIRED
  • Event ends - REQUIRED
  • Whole Day
  • Open End
  • Recurrence
  • Event Location
  • Attendees
  • Contact Name
  • Contact Email
  • Contact Phone
  • Event URL
  • Event body text (visual editor panel)
  • Change note

Note

Only three fields, title and start and end date and time, are required.

Although this is a large input panel, if you are in a hurry, type in the title and the start and end times and save. Of course, if you have the other information, you should type it in.

One part of the panel needs a bit more explanation: the event start and end times. Both these can be set using a handy pop-up calendar. This will show when you click on the date.

Setting an event to be “Whole day” will remove the start and end times.

But there are many more options: you can set an event to be “Open-ended” if you don’t know when the end date is, or if it is an ongoing activity that you would still like to show as an event.

For repeating events, use the “recurrence” link. You can set when, and how often, your event will repeat: daily, weekly, every third Tuesday of the month until 2017, etcetera. You can specify that an event should repeat a certain number of times, or until a certain date.

Note

IMPORTANT: Your event will not show on the main web site calendar until it has been published.