Skip to content

Commit

Permalink
Unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
E068097 committed Nov 22, 2024
1 parent a819370 commit f0a2365
Show file tree
Hide file tree
Showing 12 changed files with 670 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</MudSelect>
</MudTd>
<MudTd DataLabel="Delete" Style="text-align: center">
<MudIconButton Color="Color.Default" Class="deleteRouteButton" OnClick="( () => DeleteSchedule(ContextSchedule))" Icon="@Icons.Material.Filled.Delete" Size="Size.Medium"></MudIconButton>
<MudIconButton Color="Color.Default" Class="deleteRouteButton" id="deleteScheduleButton" OnClick="( () => DeleteSchedule(ContextSchedule))" Icon="@Icons.Material.Filled.Delete" Size="Size.Medium"></MudIconButton>
</MudTd>
</RowTemplate>
<FooterContent>
Expand Down Expand Up @@ -176,7 +176,7 @@
<MudPaper Class="overflow-y-auto" Elevation="0">
<MudTreeView Items="@Layers">
<ItemTemplate>
<MudTreeViewItem @bind-Expanded="@context.IsExpanded" Items="@context.Children">
<MudTreeViewItem id="selectLayer" @bind-Expanded="@context.IsExpanded" Items="@context.Children">
<Content>
<MudTreeViewItemToggleButton @bind-Expanded="@context.IsExpanded" Visible="@(context.Children.Count() != 0)" />

Expand All @@ -194,7 +194,7 @@
}
else
{
<MudTooltip Text="Add device">
<MudTooltip Text="Add layer">
<MudIconButton Color="Color.Default" Icon="@Icons.Material.Filled.CheckBoxOutlineBlank" Size="Size.Medium" @onclick="() => CheckedChanged(context)"></MudIconButton>

Check warning on line 198 in src/IoTHub.Portal.Client/Components/Planning/EditPlanning.razor

View check run for this annotation

Codecov / codecov/patch

src/IoTHub.Portal.Client/Components/Planning/EditPlanning.razor#L198

Added line #L198 was not covered by tests
</MudTooltip>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@inject ISnackbar Snackbar
@inject IPlanningClientService PlanningClientService
@inject ILayerClientService LayerClientService
@inject IScheduleClientService ScheduleClientService

<MudDialog>
<DialogContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public static IServiceCollection AddAWSInfrastructureLayer(this IServiceCollecti
.ConfigureAWSClient(configuration).Result
.ConfigureAWSServices()
.ConfigureAWSDeviceModelImages()
.ConfigureAWSSyncJobs(configuration);
.ConfigureAWSSyncJobs(configuration)
.ConfigureAWSSendingCommands(configuration);
}
private static async Task<IServiceCollection> ConfigureAWSClient(this IServiceCollection services, ConfigHandler configuration)
{
Expand Down Expand Up @@ -110,5 +111,19 @@ private static IServiceCollection ConfigureAWSSyncJobs(this IServiceCollection s
});
}

private static IServiceCollection ConfigureAWSSendingCommands(this IServiceCollection services, ConfigHandler configuration)
{
return services.AddQuartz(q =>
{
_ = q.AddJob<SendPlanningCommandJob>(j => j.WithIdentity(nameof(SendPlanningCommandJob)))
.AddTrigger(t => t
.WithIdentity($"{nameof(SendPlanningCommandJob)}")
.ForJob(nameof(SendPlanningCommandJob))
.WithSimpleSchedule(s => s
.WithIntervalInMinutes(configuration.SendCommandsToDevicesIntervalInMinutes)
.RepeatForever()));
});
}

}
}
Loading

0 comments on commit f0a2365

Please sign in to comment.