Skip to content

Commit 2a23abb

Browse files
committed
further fixes
* open quickaccess package to integrations-api module * add checkAvailability annotation to DolphinPlaces
1 parent eef20ec commit 2a23abb

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@
2626
provides QuickAccessService with NautilusBookmarks, DolphinPlaces;
2727

2828
opens org.cryptomator.linux.tray to org.cryptomator.integrations.api;
29+
opens org.cryptomator.linux.quickaccess to org.cryptomator.integrations.api;
2930
}

src/main/java/org/cryptomator/linux/quickaccess/DolphinPlaces.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* Implemenation of the {@link QuickAccessService} for KDE desktop environments using Dolphin file browser.
3131
*/
3232
@DisplayName("KDE Dolphin Places")
33+
@CheckAvailability
3334
@OperatingSystem(OperatingSystem.Value.LINUX)
3435
@Priority(90)
3536
public class DolphinPlaces implements QuickAccessService {

src/test/java/org/cryptomator/linux/quickaccess/DolphinPlacesIT.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cryptomator.linux.quickaccess;
22

3+
import org.cryptomator.integrations.common.IntegrationsLoader;
4+
import org.cryptomator.integrations.quickaccess.QuickAccessService;
35
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
6+
import org.junit.jupiter.api.Assertions;
47
import org.junit.jupiter.api.Disabled;
58
import org.junit.jupiter.api.DisplayName;
69
import org.junit.jupiter.api.Test;
@@ -11,6 +14,16 @@
1114

1215
public class DolphinPlacesIT {
1316

17+
@Test
18+
@DisplayName("If dolphin is installed, isSupported returns true and service is contained in the service provider stream")
19+
@Disabled
20+
public void testSupport() {
21+
Assertions.assertTrue(DolphinPlaces.isSupported());
22+
23+
var optionalService = IntegrationsLoader.loadAll(QuickAccessService.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.quickaccess.DolphinPlaces")).findAny();
24+
Assertions.assertTrue(optionalService.isPresent());
25+
}
26+
1427
@Test
1528
@DisplayName("Adds for 20s an entry to the Dolphin sidebar")
1629
@Disabled

src/test/java/org/cryptomator/linux/quickaccess/NautilusBookmarksIT.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cryptomator.linux.quickaccess;
22

3+
import org.cryptomator.integrations.common.IntegrationsLoader;
4+
import org.cryptomator.integrations.quickaccess.QuickAccessService;
35
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
6+
import org.junit.jupiter.api.Assertions;
47
import org.junit.jupiter.api.Disabled;
58
import org.junit.jupiter.api.DisplayName;
69
import org.junit.jupiter.api.Test;
@@ -11,6 +14,16 @@
1114

1215
public class NautilusBookmarksIT {
1316

17+
@Test
18+
@DisplayName("If nautilus is installed, isSupported returns true and service is contained in the service provider stream")
19+
@Disabled
20+
public void testSupport() {
21+
Assertions.assertTrue(NautilusBookmarks.isSupported());
22+
23+
var optionalService = IntegrationsLoader.loadAll(QuickAccessService.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.quickaccess.NautilusBookmarks")).findAny();
24+
Assertions.assertTrue(optionalService.isPresent());
25+
}
26+
1427
@Test
1528
@DisplayName("Adds for 20s an entryto the Nautilus sidebar")
1629
@Disabled

0 commit comments

Comments
 (0)