diff --git a/tests/TestHelpers/GraphHelper.php b/tests/TestHelpers/GraphHelper.php index 04e269aa9e5..39ccf8de77b 100644 --- a/tests/TestHelpers/GraphHelper.php +++ b/tests/TestHelpers/GraphHelper.php @@ -1688,7 +1688,7 @@ public static function getPermissionNameByPermissionRoleId( * @param array $shareTypes * @param string|null $permissionsRole * @param string|null $permissionsAction - * @param string|null $expireDate + * @param string|null $expirationDateTime * * @return array * @throws \Exception @@ -1698,7 +1698,7 @@ public static function createShareInviteBody( array $shareTypes, ?string $permissionsRole, ?string $permissionsAction, - ?string $expireDate + ?string $expirationDateTime ): array { $body = []; @@ -1719,8 +1719,8 @@ public static function createShareInviteBody( $body['@libre.graph.permissions.actions'] = ['libre.graph/driveItem/' . $permissionsAction]; } - if ($expireDate !== null) { - $body['expirationDateTime'] = $expireDate; + if ($expirationDateTime !== null) { + $body['expirationDateTime'] = $expirationDateTime; } return $body; } @@ -1736,7 +1736,7 @@ public static function createShareInviteBody( * @param array $shareTypes * @param string|null $permissionsRole * @param string|null $permissionsAction - * @param string|null $expireDate + * @param string|null $expirationDateTime * * @return ResponseInterface * @throws \JsonException @@ -1753,11 +1753,10 @@ public static function sendSharingInvitation( array $shareTypes, ?string $permissionsRole, ?string $permissionsAction, - ?string $expireDate + ?string $expirationDateTime ): ResponseInterface { $url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite"); - $body = self::createShareInviteBody($shareeIds, $shareTypes, $permissionsRole, $permissionsAction, $expireDate); - + $body = self::createShareInviteBody($shareeIds, $shareTypes, $permissionsRole, $permissionsAction, $expirationDateTime); return HttpRequestHelper::post( $url, $xRequestId, @@ -2115,7 +2114,7 @@ public static function getDrivePermissionsList( * @param array $shareTypes * @param string|null $permissionsRole * @param string|null $permissionsAction - * @param string|null $expireDate + * @param string|null $expirationDateTime * * @return ResponseInterface * @throws \Exception|GuzzleException @@ -2130,10 +2129,10 @@ public static function sendSharingInvitationForDrive( array $shareTypes, ?string $permissionsRole, ?string $permissionsAction, - ?string $expireDate + ?string $expirationDateTime ): ResponseInterface { $url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/root/invite"); - $body = self::createShareInviteBody($shareeIds, $shareTypes, $permissionsRole, $permissionsAction, $expireDate); + $body = self::createShareInviteBody($shareeIds, $shareTypes, $permissionsRole, $permissionsAction, $expirationDateTime); return HttpRequestHelper::post( $url, diff --git a/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature b/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature index 299be59ec7f..72dd2065629 100644 --- a/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature +++ b/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature @@ -562,12 +562,12 @@ Feature: Send a sharing invitations Given user "Alice" has uploaded file with content "to share" to "/textfile1.txt" And user "Alice" has created folder "FolderToShare" When user "Alice" sends the following resource share invitation using the Graph API: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - | expireDate | 2043-07-15T14:00:00.000Z | + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + | expirationDateTime | 2043-07-15T14:00:00.000Z | Then the HTTP status code should be "200" And the JSON data of the response should match """ @@ -658,12 +658,12 @@ Feature: Send a sharing invitations And user "Alice" has uploaded file with content "to share" to "/textfile1.txt" And user "Alice" has created folder "FolderToShare" When user "Alice" sends the following resource share invitation using the Graph API: - | resource | | - | space | Personal | - | sharee | grp1 | - | shareType | group | - | permissionsRole | | - | expireDate | 2043-07-15T14:00:00.000Z | + | resource | | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | | + | expirationDateTime | 2043-07-15T14:00:00.000Z | Then the HTTP status code should be "200" And the JSON data of the response should match """ diff --git a/tests/acceptance/features/apiSpacesShares/shareSpaces.feature b/tests/acceptance/features/apiSpacesShares/shareSpaces.feature index e073e8f598a..f90002b9190 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSpaces.feature @@ -345,11 +345,11 @@ Feature: Share spaces Scenario Outline: update the expiration date of a space in user share Given user "Alice" has sent the following space share invitation: - | space | share space | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - | expireDate | 2042-03-25T23:59:59.000Z | + | space | share space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + | expirationDateTime | 2042-03-25T23:59:59.000Z | When user "Alice" updates the space "share space" with settings: | shareWith | Brian | | expireDate | 2044-01-01T23:59:59.999+01:00 | @@ -367,11 +367,11 @@ Feature: Share spaces Given group "sales" has been created And the administrator has added a user "Brian" to the group "sales" using the Graph API And user "Alice" has sent the following space share invitation: - | space | share space | - | sharee | sales | - | shareType | group | - | permissionsRole | | - | expireDate | 2042-03-25T23:59:59.000Z | + | space | share space | + | sharee | sales | + | shareType | group | + | permissionsRole | | + | expirationDateTime | 2042-03-25T23:59:59.000Z | When user "Alice" updates the space "share space" with settings: | shareWith | sales | | shareType | 8 | @@ -388,11 +388,11 @@ Feature: Share spaces Scenario Outline: delete the expiration date of a space in user share Given user "Alice" has sent the following space share invitation: - | space | share space | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - | expireDate | 2042-03-25T23:59:59.000Z | + | space | share space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + | expirationDateTime | 2042-03-25T23:59:59.000Z | When user "Alice" updates the space "share space" with settings: | shareWith | Brian | | expireDate | | @@ -410,11 +410,11 @@ Feature: Share spaces Given group "sales" has been created And the administrator has added a user "Brian" to the group "sales" using the Graph API And user "Alice" has sent the following space share invitation: - | space | share space | - | sharee | sales | - | shareType | group | - | permissionsRole | | - | expireDate | 2042-03-25T23:59:59.000Z | + | space | share space | + | sharee | sales | + | shareType | group | + | permissionsRole | | + | expirationDateTime | 2042-03-25T23:59:59.000Z | When user "Alice" updates the space "share space" with settings: | shareWith | sales | | shareType | 8 | @@ -431,11 +431,11 @@ Feature: Share spaces Scenario Outline: check the end of expiration of a space in user share Given user "Alice" has sent the following space share invitation: - | space | share space | - | sharee | Brian | - | shareType | user | - | permissionsRole | | - | expireDate | 2042-03-25T23:59:59.000Z | + | space | share space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | + | expirationDateTime | 2042-03-25T23:59:59.000Z | When user "Alice" expires the user share of space "share space" for user "Brian" Then the HTTP status code should be "200" And the user "Brian" should not have a space called "share space" @@ -450,11 +450,11 @@ Feature: Share spaces Given group "sales" has been created And the administrator has added a user "Brian" to the group "sales" using the Graph API And user "Alice" has sent the following space share invitation: - | space | share space | - | sharee | sales | - | shareType | group | - | permissionsRole | | - | expireDate | 2042-03-25T23:59:59.000Z | + | space | share space | + | sharee | sales | + | shareType | group | + | permissionsRole | | + | expirationDateTime | 2042-03-25T23:59:59.000Z | When user "Alice" expires the group share of space "share space" for group "sales" Then the HTTP status code should be "200" And the user "Brian" should not have a space called "share space" diff --git a/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature b/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature index fc49f3b9ac5..943c4c2f545 100644 --- a/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature +++ b/tests/acceptance/features/apiSpacesShares/shareSubItemOfSpace.feature @@ -125,12 +125,12 @@ Feature: Share a file or folder that is inside a space Scenario: user changes the expiration date Given using SharingNG And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | share sub-item | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - | expireDate | 2042-01-01T23:59:59.000Z | + | resource | folder | + | space | share sub-item | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2042-01-01T23:59:59.000Z | When user "Alice" changes the last share with settings: | expireDate | 2044-01-01T23:59:59.999+01:00 | | role | viewer | @@ -142,12 +142,12 @@ Feature: Share a file or folder that is inside a space Scenario: user deletes the expiration date Given using SharingNG And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | share sub-item | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - | expireDate | 2042-01-01T23:59:59.000Z | + | resource | folder | + | space | share sub-item | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2042-01-01T23:59:59.000Z | When user "Alice" changes the last share with settings: | expireDate | | | role | viewer | @@ -160,12 +160,12 @@ Feature: Share a file or folder that is inside a space Given using OCS API version "" And using SharingNG And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | share sub-item | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - | expireDate | 2042-01-01T23:59:59.000Z | + | resource | folder | + | space | share sub-item | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2042-01-01T23:59:59.000Z | When user "Alice" changes the last share with settings: | role | | Then the HTTP status code should be "400" @@ -174,12 +174,12 @@ Feature: Share a file or folder that is inside a space Scenario: check the end of expiration date in user share Given using SharingNG And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | share sub-item | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | - | expireDate | 2042-01-01T23:59:59.000Z | + | resource | folder | + | space | share sub-item | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | expirationDateTime | 2042-01-01T23:59:59.000Z | When user "Alice" expires the last share of resource "folder" inside of the space "share sub-item" Then the HTTP status code should be "200" And as "Brian" folder "Shares/folder" should not exist @@ -190,12 +190,12 @@ Feature: Share a file or folder that is inside a space And using SharingNG And the administrator has added a user "Brian" to the group "sales" using the Graph API And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | share sub-item | - | sharee | sales | - | shareType | group | - | permissionsRole | Viewer | - | expireDate | 2042-01-01T23:59:59.000Z | + | resource | folder | + | space | share sub-item | + | sharee | sales | + | shareType | group | + | permissionsRole | Viewer | + | expirationDateTime | 2042-01-01T23:59:59.000Z | When user "Alice" expires the last share of resource "folder" inside of the space "share sub-item" Then the HTTP status code should be "200" And as "Brian" folder "Shares/folder" should not exist diff --git a/tests/acceptance/features/bootstrap/SharingNgContext.php b/tests/acceptance/features/bootstrap/SharingNgContext.php index a1a073b02e6..a46c2c5b967 100644 --- a/tests/acceptance/features/bootstrap/SharingNgContext.php +++ b/tests/acceptance/features/bootstrap/SharingNgContext.php @@ -289,7 +289,7 @@ public function sendShareInvitation(string $user, TableNode $table, string $file $permissionsRole = $rows['permissionsRole'] ?? null; $permissionsAction = $rows['permissionsAction'] ?? null; - $expireDate = $rows["expireDate"] ?? null; + $expirationDateTime = $rows["expirationDateTime"] ?? null; $response = GraphHelper::sendSharingInvitation( $this->featureContext->getBaseUrl(), @@ -302,7 +302,7 @@ public function sendShareInvitation(string $user, TableNode $table, string $file $shareTypes, $permissionsRole, $permissionsAction, - $expireDate + $expirationDateTime ); if ($response->getStatusCode() === 200) { $this->featureContext->shareNgAddToCreatedUserGroupShares($response); @@ -354,7 +354,7 @@ public function sendDriveShareInvitation(string $user, TableNode $table): Respon $permissionsRole = $rows['permissionsRole'] ?? null; $permissionsAction = $rows['permissionsAction'] ?? null; - $expireDate = $rows["expireDate"] ?? null; + $expirationDateTime = $rows["expirationDateTime"] ?? null; return GraphHelper::sendSharingInvitationForDrive( $this->featureContext->getBaseUrl(), @@ -366,7 +366,7 @@ public function sendDriveShareInvitation(string $user, TableNode $table): Respon $shareTypes, $permissionsRole, $permissionsAction, - $expireDate + $expirationDateTime ); }