parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
575 stars 190 forks source link

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

Closed mbfakourii closed 1 week ago

mbfakourii commented 2 weeks ago

Pull Request

Issue

Select the file name from the input name instead of file

Closes: #1011

Approach

n/a

Tasks

parse-github-assistant[bot] commented 2 weeks ago

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

parse-github-assistant[bot] commented 2 weeks ago

Thanks for opening this pull request!

codecov[bot] commented 2 weeks ago

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 :warning:
packages/dart/lib/src/objects/parse_x_file.dart 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mbfakourii commented 2 weeks ago

@mtrezza

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

mbfakourii commented 2 weeks ago

Could you add a test for this?

Added.

mtrezza commented 2 weeks ago

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 commented 2 weeks ago

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 commented 2 weeks ago

@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 commented 2 weeks ago

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 commented 1 week ago

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 commented 1 week ago

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

mtrezza commented 1 week ago

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 commented 1 week ago

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.

mbfakourii commented 1 week ago

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

added