Skip to content

Commit 22db1e1

Browse files
remove flaky scenario
1 parent a0612ce commit 22db1e1

File tree

3 files changed

+3
-71
lines changed

3 files changed

+3
-71
lines changed

tests/acceptance/bootstrap/SharingNgContext.php

-42
Original file line numberDiff line numberDiff line change
@@ -2135,46 +2135,4 @@ public function userListsPermissionsWithFollowingFiltersForFileOrFolderOfTheSpac
21352135
$this->getPermissionsList($user, $fileOrFolder, $space, $resource, $query)
21362136
);
21372137
}
2138-
2139-
/**
2140-
* @When user :user expires the last created share:
2141-
*
2142-
* @param string $user
2143-
* @param TableNode $table
2144-
*
2145-
* @return void
2146-
*/
2147-
public function userExpiresTheLastCreatedShare(string $user, TableNode $table): void {
2148-
$permissionID = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
2149-
$bodyRows = $table->getRowsHash();
2150-
if ($bodyRows['space'] === 'Personal' || $bodyRows['space'] === 'Shares') {
2151-
$space = $this->spacesContext->getSpaceByName($user, $bodyRows['space']);
2152-
} else {
2153-
$space = $this->spacesContext->getCreatedSpace($bodyRows['space']);
2154-
}
2155-
$spaceId = $space["id"];
2156-
2157-
$resource = $bodyRows['resource'] ?? '';
2158-
if ($resource === '' && !\in_array($bodyRows['space'], ['Personal', 'Shares'])) {
2159-
$itemId = $space['fileId'];
2160-
} else {
2161-
$itemId = $this->spacesContext->getResourceId($user, $bodyRows['space'], $resource);
2162-
}
2163-
$body = [];
2164-
$dateTime = new DateTime("now", new DateTimeZone("UTC"));
2165-
$body['expirationDateTime'] = $dateTime->modify('-5 minutes')->format('Y-m-d\TH:i:s\Z');
2166-
2167-
$this->featureContext->setResponse(
2168-
GraphHelper::updateShare(
2169-
$this->featureContext->getBaseUrl(),
2170-
$this->featureContext->getStepLineRef(),
2171-
$user,
2172-
$this->featureContext->getPasswordForUser($user),
2173-
$spaceId,
2174-
$itemId,
2175-
\json_encode($body),
2176-
$permissionID
2177-
)
2178-
);
2179-
}
21802138
}

tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

-3
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,5 @@ The expected failures in this file are from features in the owncloud/ocis repo.
324324
- [apiServiceAvailability/serviceAvailabilityCheck.feature:116](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L116)
325325
- [apiServiceAvailability/serviceAvailabilityCheck.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiServiceAvailability/serviceAvailabilityCheck.feature#L125)
326326

327-
### [Multiple in-app and mail notification generated for Share Expired event of resource inside Project drive ](https://github.com/owncloud/ocis/issues/10936)
328-
-[apiNotification/shareExpireNotification.feature:33](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiNotification/shareExpireNotification.feature#L33)
329-
330327
Note: always have an empty line at the end of this file.
331328
The bash script that processes this file requires that the last line has a newline on the end.

tests/acceptance/features/apiNotification/shareExpireNotification.feature

+3-26
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,18 @@ Feature: Share Expiry Notification
1212

1313

1414
Scenario: check share expired in-app and mail notification for Personal space resource
15-
Given user "Alice" has uploaded file with content "hello world" to "testfile.txt"
15+
Given using SharingNG
16+
And user "Alice" has uploaded file with content "hello world" to "testfile.txt"
1617
And user "Alice" has sent the following resource share invitation:
1718
| resource | testfile.txt |
1819
| space | Personal |
1920
| sharee | Brian |
2021
| shareType | user |
2122
| permissionsRole | Viewer |
2223
| expirationDateTime | 2025-07-15T14:00:00Z |
23-
When user "Alice" expires the last created share:
24-
| space | Personal |
25-
| resource | testfile.txt |
24+
When user "Alice" expires the last share of resource "testfile.txt" inside of the space "Personal"
2625
Then the HTTP status code should be "200"
2726
And user "Brian" should get a notification with subject "Membership expired" and message:
2827
| message |
2928
| Access to Space Alice Hansen lost |
3029
And user "Brian" should have "2" emails
31-
32-
@issue-10966
33-
Scenario: check share expired in-app and mail notification for Project space resource
34-
Given using spaces DAV path
35-
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
36-
And user "Alice" has created a space "NewSpace" with the default quota using the Graph API
37-
And user "Alice" has uploaded a file inside space "NewSpace" with content "share space items" to "testfile.txt"
38-
And user "Alice" has sent the following resource share invitation:
39-
| resource | testfile.txt |
40-
| space | NewSpace |
41-
| sharee | Brian |
42-
| shareType | user |
43-
| permissionsRole | Viewer |
44-
| expirationDateTime | 2025-07-15T14:00:00Z |
45-
When user "Alice" expires the last created share:
46-
| space | NewSpace |
47-
| resource | testfile.txt |
48-
Then the HTTP status code should be "200"
49-
And user "Brian" should get a notification with subject "Membership expired" and message:
50-
| message |
51-
| Access to Space NewSpace lost |
52-
And user "Brian" should have "2" emails

0 commit comments

Comments
 (0)