Skip to content

Commit

Permalink
Address codacy complains
Browse files Browse the repository at this point in the history
  • Loading branch information
1-alex98 committed Sep 24, 2022
1 parent 88e794d commit 9fc9f82
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 33 deletions.
53 changes: 29 additions & 24 deletions src/main/resources/theme/progress.css
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
.circleindicator-container {
circleindicator-color: -fx-accent;
-fx-padding: 5.0;
-fx-background-color: -fx-background;
.circleindicator-container {
circleindicator-color: -fx-accent;
-fx-padding: 5.0;
-fx-background-color: -fx-background;
}

.circleindicator-container > .circleindicator-label {
-fx-font-weight: bold;
-fx-font-size: 2.5em;
-fx-text-fill: circleindicator-color;
-fx-padding: 5.0;
-fx-font-weight: bold;
-fx-font-size: 2.5em;
-fx-text-fill: circleindicator-color;
-fx-padding: 5.0;
}

.ringindicator{
-fx-ring-width: 22.0;
-fx-inner-radius: 60.0;
.ringindicator {
-fx-ring-width: 22.0;
-fx-inner-radius: 60.0;
}

.ringindicator-inner-circle {
-fx-opacity: 0.55;
-fx-stroke: circleindicator-color;
-fx-stroke-width: 8.0px;
-fx-fill: -fx-background;
-fx-opacity: 0.55;
-fx-stroke: circleindicator-color;
-fx-stroke-width: 8.0px;
-fx-fill: -fx-background;
}

.ringindicator-filler {
-fx-stroke: circleindicator-color;
-fx-fill: -fx-background;
-fx-stroke-line-cap: butt;
-fx-stroke: circleindicator-color;
-fx-fill: -fx-background;
-fx-stroke-line-cap: butt;
}

.ringindicator-outer-circle-secondary {
-fx-opacity: 0.1;
-fx-stroke: circleindicator-color;
-fx-stroke-width: 2.0px;
-fx-fill: -fx-background;
-fx-opacity: 0.1;
-fx-stroke: circleindicator-color;
-fx-stroke-width: 2.0px;
-fx-fill: -fx-background;
}

.indeterminate {
-fx-opacity: 0.55;
-fx-stroke: linear-gradient(from 0.0% 0.0% to 70.0% 70.0%, circleindicator-color 70.0%, white 75.0%, white);
-fx-opacity: 0.55;
-fx-stroke: linear-gradient(from 0.0% 0.0% to 70.0% 70.0%, circleindicator-color 70.0%, white 75.0%, white);
}
4 changes: 2 additions & 2 deletions src/test/java/com/faforever/client/game/GameServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ public void startSearchMatchmakerThenCancelledWithGame() throws IOException {
when(leaderboardService.getActiveLeagueEntryForPlayer(junitPlayer, "global")).thenReturn(completedFuture(Optional.empty()));
when(gameUpdater.update(any(), any(), any(), any())).thenReturn(completedFuture(null));
when(mapService.download(gameLaunchMessage.getMapName())).thenReturn(completedFuture(null));
when(fafServerAccessor.getGameLaunchMessage()).thenReturn(CompletableFuture.completedFuture(gameLaunchMessage));
when(fafServerAccessor.getGameLaunchMessage()).thenReturn(completedFuture(gameLaunchMessage));
CompletableFuture<Void> future = instance.startSearchMatchmaker();
when(process.isAlive()).thenReturn(true);
future.cancel(false);
Expand All @@ -821,7 +821,7 @@ public void startSearchMatchmakerThenCancelledNoGame() throws IOException {
mockStartGameProcess(gameMapper.map(gameLaunchMessage));
when(gameUpdater.update(any(), any(), any(), any())).thenReturn(completedFuture(null));
when(mapService.download(gameLaunchMessage.getMapName())).thenReturn(completedFuture(null));
when(fafServerAccessor.getGameLaunchMessage()).thenReturn(CompletableFuture.completedFuture(gameLaunchMessage));
when(fafServerAccessor.getGameLaunchMessage()).thenReturn(completedFuture(gameLaunchMessage));
instance.startSearchMatchmaker().cancel(false);
verify(notificationService, never()).addServerNotification(any());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public void setUp() throws Exception {
loadFxml("theme/tournaments/is_ready_for_game.fxml", clazz -> instance);
}

@Test
public void testInitialization(){
instance.setTimeout(1);
instance.setDismissCallBack(() -> {});
instance.setReadyCallback(() -> {});
}

@Test
public void testTimeOut() {
AtomicBoolean dismissCalled = new AtomicBoolean(false);
Expand Down

0 comments on commit 9fc9f82

Please sign in to comment.