Skip to content

Commit

Permalink
Empty accessShare functions, ref pondersource/sciencemesh-php#91
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 17, 2022
1 parent 725589f commit 28ed7c1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This test suite tests various implementations of [Open Cloud Mesh (OCM)](https:/

## Running in Github Actions

The current main branch of this repo runs a gitbub action to test the share-with flow from each of the following servers
The current main branch of this repo runs a github action to test the share-with flow from each of the following servers
to the ocm-stub server:
* ocm-stub
* Nextcloud
Expand Down
1 change: 1 addition & 0 deletions clients/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export abstract class Client {
abstract shareWith(shareWithUser: string, shareWithHost: string, shareWithDomain: string, shareFromDomain: string): Promise<void>
abstract acceptPublicLink(url: string, remoteGuiType: string): Promise<void>
abstract acceptShare() : Promise<void>
abstract accessShare() : Promise<void>
abstract deleteAcceptedShare() : Promise<void>
abstract exit () : Promise<void>
}
4 changes: 4 additions & 0 deletions clients/owncloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export class OwncloudClient extends StubClient {
);
}

async accessShare() {
// TODO :implement
}

// Common GUI flow between ownCloud and Nextcloud:
async deleteShares(sharedWithYouUrl, contextMenuSelector, unshareSelector, doneSelector) {
await this.page.goto(sharedWithYouUrl);
Expand Down
11 changes: 11 additions & 0 deletions clients/reva.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,17 @@ export class RevaClient extends Client {
});
await Promise.all(promises);
}

async accessShare() {
const ids = await this.listReceivedOCMShares();
console.log({ ids });
const promises = ids.map((id: any) => {
console.log("Accessing share", this.guiDomain, id);
return this.updateReceivedOCMShare(id, ShareState.SHARE_STATE_ACCEPTED);
});
await Promise.all(promises);
}

async deleteAcceptedShare() {
// FIXME: todo
}
Expand Down
2 changes: 1 addition & 1 deletion debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# ./scripts/start-to-Nextcloud.sh

# And then there are really three ways to add a tester to the testnet
# that lets you poke at the "from" and the "to" system::
# that lets you poke at the "from" and the "to" system:
# 1. The way https://github.com/cs3org/ocm-test-suite/blob/main/.github/workflows/ci.yml and
# https://github.com/cs3org/ocm-test-suite/blob/main/scripts/run-test.sh do it:
# ./scripts/start-tester-unattended.sh
Expand Down
2 changes: 2 additions & 0 deletions ocm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ for (let i = 0; i < flows.length; i++) {
await fromUser.shareWith(params[`To ${to}`].username, params[`To ${to}`].ocmDomain, params[`To ${to}`].guiDomain, params[`From ${from}`].guiDomain);
console.log('toUser.acceptShare');
await toUser.acceptShare();
console.log('toUser.accessShare');
await toUser.accessShare();
console.log('toUser.deleteAcceptedShare');
await toUser.deleteAcceptedShare();
console.log('done');
Expand Down

0 comments on commit 28ed7c1

Please sign in to comment.