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

[stable12] Fix empty details view after renaming a file #7792

Merged
merged 3 commits into from Jan 11, 2018

Conversation

Projects
None yet
3 participants
@danxuliu
Member

danxuliu commented Jan 11, 2018

Backport of #7783

danxuliu added some commits Jan 11, 2018

Move adding test files to "beforeEach()"
All the tests in the "Renaming files" section added the test files,
although those calling "doRename()" added them by setting a path for the
file too. However, the path is ignored in the other tests, so adding the
files can be unified and moved to "beforeEach()".

This would be needed, for example, to show the details view for a file
before calling "doRename()".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fix empty details view after renaming a file
"FileList._updateDetailsView" expects either a file name (as a string)
or a file model (as an "OCA.File.FileInfoModel"), but when called
through "updateInList" an "OC.Files.FileInfo" object was given instead.
As the given attribute was not a model "_updateDetailsView" treated it
as a file name and tried to get the model for that file, which failed
and caused the details view to be emptied.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Add acceptance test for renaming a file with the details view open
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@MorrisJobke

tested and works 👍

@MorrisJobke MorrisJobke merged commit 2fa5466 into stable12 Jan 11, 2018

1 of 2 checks passed

continuous-integration/drone/pr this build is pending
Details
continuous-integration/drone/push the build was successful
Details

@MorrisJobke MorrisJobke deleted the stable12-7783-fix-empty-details-view-after-renaming-a-file branch Jan 11, 2018

@codecov

This comment has been minimized.

codecov bot commented Jan 11, 2018

Codecov Report

Merging #7792 into stable12 will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             stable12    #7792   +/-   ##
===========================================
  Coverage       53.84%   53.84%           
  Complexity      22758    22758           
===========================================
  Files            1385     1385           
  Lines           87148    87148           
  Branches         1331     1331           
===========================================
  Hits            46926    46926           
  Misses          40222    40222

@MorrisJobke MorrisJobke referenced this pull request Jan 18, 2018

Merged

12.0.5 RC2 #7937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment