Skip to content

Commit

Permalink
further fixes
Browse files Browse the repository at this point in the history
* open quickaccess package to integrations-api module
* add checkAvailability annotation to DolphinPlaces
  • Loading branch information
infeo committed Aug 14, 2024
1 parent eef20ec commit 2a23abb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
provides QuickAccessService with NautilusBookmarks, DolphinPlaces;

opens org.cryptomator.linux.tray to org.cryptomator.integrations.api;
opens org.cryptomator.linux.quickaccess to org.cryptomator.integrations.api;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* Implemenation of the {@link QuickAccessService} for KDE desktop environments using Dolphin file browser.
*/
@DisplayName("KDE Dolphin Places")
@CheckAvailability
@OperatingSystem(OperatingSystem.Value.LINUX)
@Priority(90)
public class DolphinPlaces implements QuickAccessService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.cryptomator.linux.quickaccess;

import org.cryptomator.integrations.common.IntegrationsLoader;
import org.cryptomator.integrations.quickaccess.QuickAccessService;
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand All @@ -11,6 +14,16 @@

public class DolphinPlacesIT {

@Test
@DisplayName("If dolphin is installed, isSupported returns true and service is contained in the service provider stream")
@Disabled
public void testSupport() {
Assertions.assertTrue(DolphinPlaces.isSupported());

var optionalService = IntegrationsLoader.loadAll(QuickAccessService.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.quickaccess.DolphinPlaces")).findAny();
Assertions.assertTrue(optionalService.isPresent());
}

@Test
@DisplayName("Adds for 20s an entry to the Dolphin sidebar")
@Disabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.cryptomator.linux.quickaccess;

import org.cryptomator.integrations.common.IntegrationsLoader;
import org.cryptomator.integrations.quickaccess.QuickAccessService;
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand All @@ -11,6 +14,16 @@

public class NautilusBookmarksIT {

@Test
@DisplayName("If nautilus is installed, isSupported returns true and service is contained in the service provider stream")
@Disabled
public void testSupport() {
Assertions.assertTrue(NautilusBookmarks.isSupported());

var optionalService = IntegrationsLoader.loadAll(QuickAccessService.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.quickaccess.NautilusBookmarks")).findAny();
Assertions.assertTrue(optionalService.isPresent());
}

@Test
@DisplayName("Adds for 20s an entryto the Nautilus sidebar")
@Disabled
Expand Down

0 comments on commit 2a23abb

Please sign in to comment.