From 0eba4a40e26c83980253864d7fd63c1223975e07 Mon Sep 17 00:00:00 2001 From: crib Date: Wed, 23 Mar 2022 16:33:17 +0100 Subject: [PATCH 1/4] Rearrange + --- .../Client/Pages/DeviceModels/DeviceModelListPage.razor | 9 ++++----- .../Client/Pages/Devices/DeviceDetailPage.razor | 1 + .../Client/Pages/Devices/DeviceListPage.razor | 9 ++++----- .../Client/Pages/Edge_Devices/EdgeDeviceListPage.razor | 7 +++---- .../LoRaWAN/Concentrator/ConcentratorListPage.razor | 8 ++++---- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor index 87b9586bb..16c91b62c 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor @@ -37,7 +37,9 @@ Device Models - + + + @@ -69,10 +71,7 @@ } - - - - + @code { diff --git a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceDetailPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceDetailPage.razor index 0ee4d2c5c..528f59518 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceDetailPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceDetailPage.razor @@ -1,5 +1,6 @@ @page "/devices/{DeviceID}" @using AzureIoTHub.Portal.Client.Pages.Devices.LoRaWAN +@using AzureIoTHub.Portal.Client.Pages.Edge_Devices @using AzureIoTHub.Portal.Client.Validators @using AzureIoTHub.Portal.Models @using AzureIoTHub.Portal.Models.v10 diff --git a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor index 035ca0f4e..184dc9f27 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor @@ -87,7 +87,9 @@ Devices - + + + @@ -151,10 +153,7 @@ - - - - + @code { diff --git a/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor index 6e7c4cfe3..1904aff86 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor @@ -67,7 +67,9 @@ Gateways - + + + ID @@ -112,9 +114,6 @@ - - - @code { diff --git a/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor index 32ec5a400..0c185eca6 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor @@ -24,7 +24,9 @@ LoRaWAN Concentrators - + + + Device @@ -76,9 +78,7 @@ - - - + @code { From 7f8c1c0128f34ccbb4621154d12c8e3d928f3180 Mon Sep 17 00:00:00 2001 From: crib Date: Thu, 24 Mar 2022 15:25:37 +0100 Subject: [PATCH 2/4] modification ID --- .../Pages/Devices/DevicesListPageTests.cs | 1 - .../Client/Pages/DeviceModels/DeviceModelListPage.razor | 2 +- .../Client/Pages/Devices/DeviceListPage.razor | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs b/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs index 752a4223d..e8b93251c 100644 --- a/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs +++ b/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs @@ -124,7 +124,6 @@ public async Task WhenResetFilterButtonClickShouldClearFilters() } [TestCase("newDeviceButton")] - [TestCase("tableAddItemButton")] public void WhenAddNewDeviceClickShouldNavigateToNewDevicePage(string buttonName) { // Arrange diff --git a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor index 16c91b62c..7b77146b4 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor @@ -38,7 +38,7 @@ - + diff --git a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor index 184dc9f27..98f37ca1b 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor @@ -88,7 +88,7 @@ - + From 0dc3453d2355036d5de190452a8f016d3a66b482 Mon Sep 17 00:00:00 2001 From: crib Date: Thu, 24 Mar 2022 17:23:45 +0100 Subject: [PATCH 3/4] Changed add --- .../Client/Pages/DeviceModels/DeviceModelListPage.razor | 4 +--- .../Client/Pages/Devices/DeviceListPage.razor | 4 +--- .../Client/Pages/Edge_Devices/EdgeDeviceListPage.razor | 4 +--- .../Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor index 7b77146b4..74e82bbce 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor @@ -37,9 +37,7 @@ Device Models - - - + diff --git a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor index 98f37ca1b..d3a86f675 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor @@ -87,9 +87,7 @@ Devices - - - + diff --git a/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor index 1904aff86..a26e9f468 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Edge_Devices/EdgeDeviceListPage.razor @@ -67,9 +67,7 @@ Gateways - - - + ID diff --git a/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor index 0c185eca6..7e7d2ab7b 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor @@ -24,9 +24,7 @@ LoRaWAN Concentrators - - - + Device From 3f5ce619b30cc563cd65bf754518be0be3eb9410 Mon Sep 17 00:00:00 2001 From: crib Date: Fri, 25 Mar 2022 16:08:44 +0100 Subject: [PATCH 4/4] modified add --- .../Pages/Devices/DevicesListPageTests.cs | 6 +++--- .../Client/Pages/DeviceModels/DeviceModelListPage.razor | 2 +- .../Client/Pages/Devices/DeviceListPage.razor | 2 +- .../Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs b/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs index e8b93251c..cbfc776aa 100644 --- a/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs +++ b/src/AzureIoTHub.Portal.Server.Tests.Unit/Pages/Devices/DevicesListPageTests.cs @@ -123,8 +123,8 @@ public async Task WhenResetFilterButtonClickShouldClearFilters() this.mockRepository.VerifyAll(); } - [TestCase("newDeviceButton")] - public void WhenAddNewDeviceClickShouldNavigateToNewDevicePage(string buttonName) + [Test] + public void WhenAddNewDeviceClickShouldNavigateToNewDevicePage() { // Arrange _ = this.mockHttpClient @@ -145,7 +145,7 @@ public void WhenAddNewDeviceClickShouldNavigateToNewDevicePage(string buttonName var cut = RenderComponent(); // Act - cut.WaitForElement($"#{buttonName}").Click(); + cut.WaitForElement($"#addDeviceButton").Click(); cut.WaitForAssertion(() => string.Equals("http://localhost/devices/new", mockNavigationManager.Uri, StringComparison.OrdinalIgnoreCase)); // Assert diff --git a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor index 74e82bbce..8209ccd65 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/DeviceModels/DeviceModelListPage.razor @@ -37,7 +37,7 @@ Device Models - + diff --git a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor index d3a86f675..ffce61a82 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/Devices/DeviceListPage.razor @@ -87,7 +87,7 @@ Devices - + diff --git a/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor b/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor index 7e7d2ab7b..b79a75246 100644 --- a/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor +++ b/src/AzureIoTHub.Portal/Client/Pages/LoRaWAN/Concentrator/ConcentratorListPage.razor @@ -24,7 +24,7 @@ LoRaWAN Concentrators - + Device