-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6e8a9f
commit 821933a
Showing
6 changed files
with
90 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
tests/e2e/cucumber/features/smoke/app-provider/urlJourneys.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Feature: url stability for mobile and desktop client | ||
As a user | ||
I want to work on different docs, sheets, slides etc.., using online office suites like Collabora or OnlyOffice | ||
To make sure that opening the file from the mobile and desktop client happens without problems | ||
# To run this feature we need to run the external app-provider service along with wopi, OnlyOffice, Collabora services | ||
# This is a minimal test for the integration of ocis with different online office suites like Collabora and OnlyOffice | ||
|
||
Background: | ||
Given "Admin" creates following users using API | ||
| id | | ||
| Alice | | ||
And "Alice" logs in | ||
And "Alice" opens the "files" app | ||
|
||
Scenario: create an OpenDocument file with Collabora | ||
When "Alice" creates the following resources | ||
| resource | type | content | | ||
| OpenDocument.odt | OpenDocument | OpenDocument Content | | ||
|
||
# Check that the file can be opened in collabora using the url. https://github.com/owncloud/web/issues/9897 | ||
# desktop feature | ||
When "Alice" opens the file "OpenDocument.odt" of space "personal" in collabora through the URL for desktop client | ||
Then "Alice" should see the content "OpenDocument Content" in editor "Collabora" | ||
|
||
# mobile feature | ||
When "Alice" opens the file "OpenDocument.odt" of space "personal" in collabora through the URL for mobile client | ||
Then "Alice" should see the content "OpenDocument Content" in editor "Collabora" | ||
And "Alice" logs out | ||
|
||
|
||
Scenario: create a Microsoft Word file with OnlyOffice | ||
When "Alice" creates the following resources | ||
| resource | type | content | | ||
| MicrosoftWord.docx | Microsoft Word | Microsoft Word Content | | ||
|
||
# Check that the file can be opened in collabora using the url. https://github.com/owncloud/web/issues/9897 | ||
# desktop feature | ||
When "Alice" opens the file "MicrosoftWord.docx" of space "personal" in OnlyOffice through the URL for desktop client | ||
Then "Alice" should see the content "Microsoft Word Content" in editor "OnlyOffice" | ||
|
||
# mobile feature | ||
When "Alice" opens the file "MicrosoftWord.docx" of space "personal" in OnlyOffice through the URL for mobile client | ||
Then "Alice" should see the content "Microsoft Word Content" in editor "OnlyOffice" | ||
And "Alice" logs out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './openWithWeb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import join from 'join-path' | ||
import { checkResponseStatus, request } from '../http' | ||
import { User } from '../../types' | ||
|
||
export const getUrl = async ({ | ||
user, | ||
fileId, | ||
editorName | ||
}: { | ||
user: User | ||
fileId: string | ||
editorName: string | ||
}): Promise<string> => { | ||
const response = await request({ | ||
method: 'POST', | ||
path: join('app', 'open-with-web', `?file_id=${fileId}`, `&app_name=${editorName}`), | ||
user: user | ||
}) | ||
checkResponseStatus(response, 'Failed while getting url') | ||
const respBody = await response.json() | ||
return respBody.uri | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters