Skip to content

fix: Select input name instead of file in ParseFile #1012

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

Merged
merged 4 commits into from
Oct 16, 2024

Conversation

mbfakourii
Copy link
Member

Pull Request

Issue

Select the file name from the input name instead of file

Closes: #1011

Approach

n/a

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: parse file name fix: Parse file name Oct 12, 2024
Copy link

Thanks for opening this pull request!

Copy link

codecov bot commented Oct 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 43.48%. Comparing base (c388545) to head (d78c59d).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
packages/dart/lib/src/objects/parse_file.dart 0.00% 1 Missing ⚠️
packages/dart/lib/src/objects/parse_x_file.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1012      +/-   ##
==========================================
+ Coverage   43.37%   43.48%   +0.11%     
==========================================
  Files          61       61              
  Lines        3463     3463              
==========================================
+ Hits         1502     1506       +4     
+ Misses       1961     1957       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mbfakourii mbfakourii changed the title fix: Parse file name fix: Select input name instead of file in ParseFile Oct 12, 2024
@mbfakourii
Copy link
Member Author

mbfakourii commented Oct 12, 2024

@mtrezza

The two failed items are not related to the codes of this PR. I will check these two items in another PR.

@mbfakourii mbfakourii requested a review from a team October 12, 2024 06:04
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Could you add a test for this?

@mbfakourii
Copy link
Member Author

Could you add a test for this?

Added.

@mtrezza
Copy link
Member

mtrezza commented Oct 12, 2024

It seems that codecov still reported the new code as not covered. Is there a test case missing?

https://github.com/parse-community/Parse-SDK-Flutter/pull/1012/checks?check_run_id=31443404272

@mbfakourii
Copy link
Member Author

It seems that codecov still reported the new code as not covered. Is there a test case missing?

https://github.com/parse-community/Parse-SDK-Flutter/pull/1012/checks?check_run_id=31443404272

No, there is no problem. I have written a test for exactly the same line that had problem. Codecov seems to have not detected well !

@mbfakourii
Copy link
Member Author

mbfakourii commented Oct 12, 2024

@mtrezza

Why are the comments removed? These comments are based on the project's test writing standard

Please check these files.

https://github.com/parse-community/Parse-SDK-Flutter/tree/master/packages/dart/test/src

@mtrezza
Copy link
Member

mtrezza commented Oct 13, 2024

I don't think these comments add any value, nor are they currently consistently used, nor are they practical.

If you look at

https://github.com/parse-community/Parse-SDK-Flutter/blob/master/packages/dart/test/src/objects/parse_base_test.dart

you can see that they are all over the place, sometimes missing, sometimes they are mixed with other comments with seems confusing. It's obvious that an expect is an assertion, and there may not be a clear order as a test may have multiple stages.

I'd remove them over time and avoid them for new tests.

@mbfakourii
Copy link
Member Author

It seems that codecov still reported the new code as not covered. Is there a test case missing?

https://github.com/parse-community/Parse-SDK-Flutter/pull/1012/checks?check_run_id=31443404272

No, there is no problem. I have written a test for exactly the same line that had problem. Codecov seems to have not detected well !

@mtrezza

@mtrezza
Copy link
Member

mtrezza commented Oct 15, 2024

Alright, let's disregard the coverage warning for that line.

@mtrezza
Copy link
Member

mtrezza commented Oct 15, 2024

What should we do about the failing beta in the CI? I think we've added it to keep the codebase compatible for the new release. Is it failing because of a change in this PR, or is that unrelated?

@mbfakourii
Copy link
Member Author

What should we do about the failing beta in the CI? I think we've added it to keep the codebase compatible for the new release. Is it failing because of a change in this PR, or is that unrelated?

The reason ci fails is a warning linter in the beta version of Dart and Flutter and is not related to this PR.

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Great, if you could add the version change then we go ahead and merge.

@mbfakourii
Copy link
Member Author

Great, if you could add the version change then we go ahead and merge.

added

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good!

@mtrezza mtrezza merged commit 2876168 into parse-community:master Oct 16, 2024
14 of 17 checks passed
@mbfakourii mbfakourii deleted the fix_file_name_in_upload branch October 17, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse file name not selected
2 participants