Skip to content
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

[tests-only][full-ci] test: add test coverage for opening file with non-existing fileId using /app/open-with-web endpoint #9985

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

anon-pradip
Copy link
Contributor

Description

Added test to send post request to /app/open-with-web endpoint with non-existing file id.

Related Issue

Motivation and Context

How Has This Been Tested?

  • Locally
  • CI

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@@ -522,3 +522,33 @@ Feature: collaboration (wopi)
| app-endpoint |
| /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice |
| /app/open-with-web?file_id=<<FILEID>> |


Scenario Outline: open file with non-existing file id (open-with-web)
Copy link
Contributor

@amrita-shrestha amrita-shrestha Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is about sending post requests on deleted file rather than non existent. So either rewrite that here or use fake file id generate from function. Plus add tries to here too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file-id of deleted file also doesn't exist in ocis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but how would you like to call the scenario should not matter in this case.

Copy link
Contributor

@amrita-shrestha amrita-shrestha Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file-id of deleted file also doesn't exist in ocis.

On the surface, it looks the same but in depth it's different. If the deleted file ID still works then how do we distinguish what the real problem is file id not deleted or random file ID giving a response

but how would you like to call the scenario should not matter in this case.

actually, it matter when we generalize scenarios title and then have to go through steps to understand the test case that consume lot of time

tests/acceptance/features/apiCollaboration/wopi.feature Outdated Show resolved Hide resolved
@saw-jan saw-jan mentioned this pull request Sep 11, 2024
22 tasks
@anon-pradip anon-pradip force-pushed the test-non-existing-fileId branch 2 times, most recently from c611945 to 5535ddb Compare September 12, 2024 04:26
Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

sonarcloud bot commented Sep 12, 2024

@saw-jan saw-jan merged commit 3b85d45 into master Sep 13, 2024
4 checks passed
@saw-jan saw-jan deleted the test-non-existing-fileId branch September 13, 2024 04:26
ownclouders pushed a commit that referenced this pull request Sep 13, 2024
[tests-only][full-ci] test: add test coverage for opening file with non-existing fileId using /app/open-with-web endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants