Calendar: Adding test for ccalendarevent resources and preparing test for invitation feature, still need to be adapted to be working

pull/3939/head
NicoDucou 4 years ago
parent 26525f82f4
commit bd157065bb
  1. 92
      tests/behat/features/toolAgenda.feature

@ -16,6 +16,8 @@ Feature: Agenda tool
And I press "Add event" And I press "Add event"
And wait very long for the page to be loaded And wait very long for the page to be loaded
Then I should see "Event added" Then I should see "Event added"
# TODO we need to check if the event appears in the personal agenda on resources/ccalendarevent
# For the moment it does not appear
Scenario: Create an event inside course TEMP Scenario: Create an event inside course TEMP
Given I am on "/main/calendar/agenda.php?action=add&type=course&cid=1" Given I am on "/main/calendar/agenda.php?action=add&type=course&cid=1"
@ -30,4 +32,94 @@ Feature: Agenda tool
And wait very long for the page to be loaded And wait very long for the page to be loaded
Then I should see "Event added" Then I should see "Event added"
#TODO This scenario needs to be fixed because I do not know how to set the start date and the end date of the event.
#There is an input id but it is impossible to know it. I put startDate and endDate for the moment.
# Scenario: Create a personal event from the general agenda
# Given I am on "/resources/ccalendarevent"
# When I follow "Add event"
# Then I fill in the following:
# | title | Personal event from general agenda |
# | Content | Content for personal event from general agenda |
# And I fill in the following:
# | startDate | 2021-07-26 14:15 |
# | endDate | 2021-07-26 14:45 |
# And I press "Add"
# Then I should see "Personal event from general agenda created"
#TODO This scenario needs to be fixed because I do not know how to set the start date and the end date of the event.
#There is an input id but it is impossible to know it. I put startDate and endDate for the moment.
#We also need to add the user seleccion in the form and finaly connect as the invitee to check access and mail notification in inbox
# Scenario: Create a personal event from the general agenda and invite user who can not modify the event
# Given I am on "/resources/ccalendarevent"
# When I follow "Add event"
# Then I fill in the following:
# | title | Personal event from general agenda with invitees not editable |
# | Content | Content for personal event from general agenda with invitees not editable |
# And I fill in the following:
# | startDate | 2021-07-27 14:15 |
# | endDate | 2021-07-27 14:45 |
# And I focus "Shere with User"
# And I fill in "Share with User" with "abagg"
# And I wait for the page to be loaded
# Then I select "abaggins" from "Share with User"
# And I press "Add"
# Then I should see "Personal event from general agenda with invitees not editable created"
# Then I am user abaggins
# And I am on "/resources/ccalendarevent"
# Then I should see "Personal event from general agenda with invitees not editable"
# And I follow "Personal event from general agenda with invitees not editable"
# And I should not see "edit"
# Then I am a platform administrator
# And I am on "/resources/ccalendarevent"
# Then I should see "Personal event from general agenda with invitees not editable"
# And I follow "Personal event from general agenda with invitees not editable"
# And I should see "Delete"
# Then I follow "Delete"
# And I am on "/resources/ccalendarevent"
# Then I should not see "Personal event from general agenda with invitees editable"
# Then I am user abaggins
# And I am on "/resources/ccalendarevent"
# Then I should not see "Personal event from general agenda with invitees not editable"
#TODO This scenario needs to be fixed because I do not know how to set the start date and the end date of the event.
#There is an input id but it is impossible to know it. I put startDate and endDate for the moment.
#We also need to add the user seleccion in the form and finaly connect as the invitee to check access and mail notification in inbox
# Scenario: Create a personal event from the general agenda and invite user who can modify the event
# Given I am on "/resources/ccalendarevent"
# When I follow "Add event"
# Then I fill in the following:
# | title | Personal event from general agenda with invitees editable |
# | Content | Content for personal event from general agenda with invitees editable |
# And I fill in the following:
# | startDate | 2021-07-28 14:15 |
# | endDate | 2021-07-28 14:45 |
# And I focus "Share with User"
# And I fill in "Share with User" with "abagg"
# And I wait for the page to be loaded
# Then I select "abaggins" from "Share with User"
# Then I check "Is it editable by the invitees?"
# And I press "Add"
# Then I should see "Personal event from general agenda with invitees editable created"
# Then I am user abaggins
# And I am on "/resources/ccalendarevent"
# Then I should see "Personal event from general agenda with invitees editable"
# And I follow "Personal event from general agenda with invitees editable"
# And I should not see "Edit"
# Then I follow "Delete"
# And I should see "Are you sure you want to delete this event?"
# And I follow "OK"
# Then I should not see "Personal event from general agenda with invitees editable"
# Then I am a platform administrator
# And I am on "/resources/ccalendarevent"
# And I should see "Personal event from general agenda with invitees editable"
# And I follow "Personal event from general agenda with invitees editable"
# And I should not see "Edit"
# And I follow "Edit"
# Then I should not see "abaggins"
# Then I follow "Cancel"
# Then I should see "Delete"
# Then I follow "Delete"
# And I should see "Are you sure you want to delete this event?"
# And I follow "OK"
# And I am on "/resources/ccalendarevent"
# Then I should not see "Personal event from general agenda with invitees editable"

Loading…
Cancel
Save