From bd157065bbc39dae1deb25a5d39ce3a7a1149643 Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Mon, 26 Jul 2021 16:28:16 +0200 Subject: [PATCH] Calendar: Adding test for ccalendarevent resources and preparing test for invitation feature, still need to be adapted to be working --- tests/behat/features/toolAgenda.feature | 92 +++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/tests/behat/features/toolAgenda.feature b/tests/behat/features/toolAgenda.feature index 3e73629651..63cd3fa083 100644 --- a/tests/behat/features/toolAgenda.feature +++ b/tests/behat/features/toolAgenda.feature @@ -16,6 +16,8 @@ Feature: Agenda tool And I press "Add event" And wait very long for the page to be loaded 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 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 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"