From 8ce51ed6f690ca1bb8c7633a35ec96545b9539d2 Mon Sep 17 00:00:00 2001 From: sapmentors Date: Tue, 4 Oct 2016 22:08:41 +0200 Subject: [PATCH] Missing files of last commit #25 --- test/functions/OData.js | 11 +++++++++++ test/parameters.js | 2 ++ test/procedures/setup.hdbprocedure | 3 +++ 3 files changed, 16 insertions(+) diff --git a/test/functions/OData.js b/test/functions/OData.js index f489e07..800655e 100644 --- a/test/functions/OData.js +++ b/test/functions/OData.js @@ -86,6 +86,17 @@ function addCoOrganizer(_EventID, _UserName) { return xhr; } +function addDevice(_EventID, _DeviceID) { + var create = { + "EventID": _EventID, + "DeviceID": _DeviceID, + "Active": "Y" + }; + var xhr = prepareRequest("POST", "/com/sap/sapmentors/sitreg/odataorganizer/service.xsodata/Devices"); + xhr.send(JSON.stringify(create)); + return xhr; +} + function createParticipant(_EventID, _UserName, _ParticipantID = 1) { var participantUri = "/com/sap/sapmentors/sitreg/odataparticipant/service.xsodata/Participant"; var xhr = prepareRequest("POST", participantUri); diff --git a/test/parameters.js b/test/parameters.js index 042f715..beb9e14 100644 --- a/test/parameters.js +++ b/test/parameters.js @@ -37,3 +37,5 @@ var participantUrlSmall = ""; var MaxParticipants = 90; var EMail = "PARTICIPANT@test.com"; var SHA256HASH = ""; +var deviceID = "3549d56f-3552-4d6a-bcec-57b61aedb6f1"; + diff --git a/test/procedures/setup.hdbprocedure b/test/procedures/setup.hdbprocedure index c2f02a0..ead20c8 100644 --- a/test/procedures/setup.hdbprocedure +++ b/test/procedures/setup.hdbprocedure @@ -38,6 +38,9 @@ BEGIN OR "History.CreatedBy" = 'COORGANIZER'; DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.CoOrganizer" WHERE "History.CreatedBy" = 'ORGANIZER'; + DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Device" + WHERE "History.CreatedBy" = 'ORGANIZER' + OR "History.CreatedBy" = 'COORGANIZER'; DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.RegisterAsOrganizerQueue" WHERE "History.CreatedBy" = 'PARTICIPANT'; DELETE FROM "com.sap.sapmentors.sitreg.data::SITreg.Organizer"