-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements for app provider #6003
Improvements for app provider #6003
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
782a2f0
to
47c81fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look pretty good (just ran them locally against the oCIS-wopi example. To go forward with this, you'll have to run yarn test:unit packages/web-app-external/ -u
to update & commit the snapshot tests (and we'll need to investigate why the CI died for you before even reaching them)
Also, could you add one (or two?) bugfix changelog item(s) in the |
47c81fa
to
199a4ed
Compare
Results for oC10SharingAccept https://drone.owncloud.com/owncloud/web/20177/14/1 |
Is the pipeline breaking in sharing? I don't see the relation to this PR. Can you help me? |
Yeah we'll do a code review & CI check after standup today! |
9e15e52
to
67a9ed7
Compare
Results for oCISFavorites https://drone.owncloud.com/owncloud/web/20223/53/1 |
Results for oCISResharing1 https://drone.owncloud.com/owncloud/web/20223/62/1 |
Results for oC10XGAPortrait2 https://drone.owncloud.com/owncloud/web/20223/45/1 |
Results for oC10XGAPortrait1 https://drone.owncloud.com/owncloud/web/20223/44/1 |
Results for oCISFiles1 https://drone.owncloud.com/owncloud/web/20223/54/1 |
Results for oC10SharingExternalRoot https://drone.owncloud.com/owncloud/web/20223/42/1 |
Results for oC10XGAPortraitNotifications https://drone.owncloud.com/owncloud/web/20223/43/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being this naggy, found more small stuff 😬
@@ -3,6 +3,7 @@ | |||
exports[`The external app error screen component displays an icon and a paragraph 1`] = ` | |||
<div class="uk-text-center"> | |||
<ocicon-stub size="xxlarge" name="warning"></ocicon-stub> | |||
<p data-msgid="Error when loading the application" data-current-language="en_US">Error when loading the application</p> | |||
<h1 class="oc-text-lead" data-msgid="Error when loading the application" data-current-language="en_US">Error when loading the application</h1> | |||
<!----> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to see a scenario where an error message is given and rendered in the ErrorScreen test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to add tests... Can you explain/give some pointers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test lives close to the component (https://github.com/owncloud/web/blob/master/packages/web-app-external/tests/unit/components/ErrorScreen.spec.ts) and should be pretty self-explanatory:
describe
steps (strings) to explain the contextit
steps (strings) to assert certain behavior- components get mounted and then you can assert a certain DOM structure (snapshot tests, like in this case), check if user interactions trigger correct behavior (by e.g. mocking clicks) etc
- you can mount them passing props (in this case you'd want one snapshot test with and one without the errorMessage and check if the
<p>
tag gets rendered if an errorMessage is given
Feel free to get inspired by the other tests, usually the files app offers more diverse test scenarios: https://github.com/owncloud/web/tree/master/packages/web-app-files/tests/unit/components
<h1 class="oc-invisible-sr">"exampleApp" app page</h1> | ||
<errorscreen-stub></errorscreen-stub> | ||
<loadingscreen-stub></loadingscreen-stub> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this doesn't render the errorscreen anymore, could you investigate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elizavetaRa can you have a look?
<h1 class="oc-invisible-sr">"exampleApp" app page</h1> | ||
<errorscreen-stub></errorscreen-stub> | ||
<loadingscreen-stub></loadingscreen-stub> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this doesn't render the errorscreen anymore, could you investigate?
Np! I'm super picky when reviewing PRs so I expect the same from others :) |
Results for oC10SharingPermissionsUsers https://drone.owncloud.com/owncloud/web/20262/33/1 |
82c1ea1
to
8d9b664
Compare
Results for oC10SharingAccept https://drone.owncloud.com/owncloud/web/20315/14/1
|
8d9b664
to
e35cd69
Compare
Updated the branch with latest master. @elizavetaRa can you check @pascalwengerter message?
@pascalwengerter sorry, didn't have time to add tests. Could your QA team do it? |
Avoid scrollbars on apps
e35cd69
to
834dd67
Compare
Kudos, SonarCloud Quality Gate passed! |
I'll merge this PR into a temporary branch in |
This PR fixes 2 bugs for the app-provider extension and adds error messages to the UI.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: