-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Only disable move to file dir when path equals #7269
Conversation
Fix equals in path method Fixes #7194
void isNotSamePath() { | ||
linkedFile = new LinkedFile("desc", tempFile, "pdf"); | ||
databaseContext = mock(BibDatabaseContext.class); | ||
when(filePreferences.getFileNamePattern()).thenReturn("[citationkey]"); // use this variant, as we cannot mock the linkedFileHandler cause it's initialized inside the viewModel |
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.
If it's hard to write tests, then it's a good indication that some refactoring should be done. Indeed, we use the mvvm pattern to make testing easy. Could you thus please add a constructor in the viewmodel that accepts a linkedFileHandler
.
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.
Actually, it's just the comment which is obsolete here, as the linkedFilesHandler is not required and can be tested separately (and already is). Would need the same mocking, so no difference.
* upstream/master: (201 commits) Only disable move to file dir when path equals (#7269) Improved detection of long DOI's within text (#7260) Add missing author and fix name Fix style of highlighted checkboxes while searching in preferences (#7258) Updates to institution citation keys (#7210) Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251) Bump classgraph from 4.8.97 to 4.8.98 (#7250) Bump bcprov-jdk15on from 1.67 to 1.68 (#7249) Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252) Bump unirest-java from 3.11.06 to 3.11.09 (#7254) Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253) Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255) Added a check to integrate with the flatpak package (#7248) New translations JabRef_en.properties (Chinese Traditional) (#7247) Update code-howtos.md GitBook: [master] 5 pages and 25 assets modified New Crowdin updates (#7246) add language mapping for chinese remove chinese content fix hamcrest link ... # Conflicts: # src/main/java/org/jabref/gui/JabRefFrame.java # src/main/java/org/jabref/gui/dialogs/AutosaveUiManager.java # src/main/java/org/jabref/gui/exporter/SaveAction.java # src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java # src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java # src/test/java/org/jabref/gui/exporter/SaveDatabaseActionTest.java
* updateGradle7: (39 commits) try upgrading gradle Only disable move to file dir when path equals (#7269) Improved detection of long DOI's within text (#7260) Add missing author and fix name Fix style of highlighted checkboxes while searching in preferences (#7258) Updates to institution citation keys (#7210) Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251) Bump classgraph from 4.8.97 to 4.8.98 (#7250) Bump bcprov-jdk15on from 1.67 to 1.68 (#7249) Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252) Bump unirest-java from 3.11.06 to 3.11.09 (#7254) Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253) Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255) Added a check to integrate with the flatpak package (#7248) New translations JabRef_en.properties (Chinese Traditional) (#7247) Update code-howtos.md GitBook: [master] 5 pages and 25 assets modified New Crowdin updates (#7246) add language mapping for chinese remove chinese content ...
* upstream/master: fix checsktyle Fix for application dialogs opening in wrong displays (#7273) Only disable move to file dir when path equals (#7269) Improved detection of long DOI's within text (#7260) Add missing author and fix name Fix style of highlighted checkboxes while searching in preferences (#7258) Updates to institution citation keys (#7210) Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251) Bump classgraph from 4.8.97 to 4.8.98 (#7250) Bump bcprov-jdk15on from 1.67 to 1.68 (#7249) Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252) Bump unirest-java from 3.11.06 to 3.11.09 (#7254) Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253) Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255) # Conflicts: # src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
Fix equals in path method
Fixes #7194
The dialog is now only disable when the file is already in the file directory