Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/870 edge models creation/edition page #892

Merged
merged 47 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ac9af4b
edge model create page
Sben65 Jun 27, 2022
9f53964
implement create edge device model page
Sben65 Jun 28, 2022
438ffd8
implement Service for edgeModel, EdgeModelListPage, EdgeModel creatio…
Sben65 Jun 30, 2022
bd0c9a0
create edgeModel mapper
Sben65 Jun 30, 2022
92c4e54
test module content format
Sben65 Jul 1, 2022
51addd3
change properties name
Sben65 Jul 1, 2022
059e09a
moduleContent : doesn't work
Sben65 Jul 2, 2022
549ca7a
model change
Sben65 Jul 18, 2022
2340b8f
edge model create page
Sben65 Jun 27, 2022
53d2b1d
implement create edge device model page
Sben65 Jun 28, 2022
d83c6ba
implement Service for edgeModel, EdgeModelListPage, EdgeModel creatio…
Sben65 Jun 30, 2022
2b1d962
create edgeModel mapper
Sben65 Jun 30, 2022
a3d8ea9
edge device model edition page
Sben65 Jul 20, 2022
e912d9b
add edgemodule mapper
Sben65 Aug 8, 2022
7cd87be
task: module and environment variable
Sben65 Aug 10, 2022
a96e676
delete useless files and refactoring
Sben65 Aug 11, 2022
f3e88d6
delete unused file
Sben65 Aug 11, 2022
79f4b4b
create unit test for edgeModelClientService
Sben65 Aug 11, 2022
c3d41a6
add edgeModelController unit test.
Sben65 Aug 11, 2022
b0c7b8b
add edgeModelMapper unit test
Sben65 Aug 11, 2022
4a26196
resolve code scanning issues
Sben65 Aug 11, 2022
73d94d1
fix code scanning issues
Sben65 Aug 11, 2022
d1f951a
add some test for configService
Sben65 Aug 11, 2022
7ef34c6
fix module dialog unit test
Sben65 Aug 12, 2022
9d9d315
add update edge model
Sben65 Aug 12, 2022
813cc04
add configHelper test.
Sben65 Aug 12, 2022
dee8415
add unit test on edgeModelServiceTest
Sben65 Aug 15, 2022
63b79f4
delete useless test
Sben65 Aug 15, 2022
05f3cfc
add new test on EdgeModelClientServiceTest
Sben65 Aug 15, 2022
00ab50b
add new unit test on EdgeModelsControllerTest
Sben65 Aug 15, 2022
822c959
add new test on configServiceTest
Sben65 Aug 16, 2022
56e2d8f
add new test
Sben65 Aug 16, 2022
b38327e
add test on edgeModelsListPageTest
Sben65 Aug 16, 2022
50f8f2a
add new test on edgeModelListPage
Sben65 Aug 16, 2022
0c75cbb
fix error
Sben65 Aug 16, 2022
0e98131
fix code scanning alert
Sben65 Aug 16, 2022
6619f97
add test on createEdgeModelPage
Sben65 Aug 17, 2022
68882ac
Bug fix #1080 and bug fix #1083
Sben65 Aug 17, 2022
7f2d61d
add unit test on deleteEdgeModelDialog
Sben65 Aug 18, 2022
513889e
add new test on createEdgeModelPage
Sben65 Aug 18, 2022
8208add
add new test on edgeModelService
Sben65 Aug 18, 2022
63bb955
add EdgeModelDetailPage unit test
Sben65 Aug 18, 2022
fc9606a
add new test to ConfigHelpers
Sben65 Aug 18, 2022
381d213
fix unit test
Sben65 Aug 18, 2022
e4c10c5
fix bug: Edge Model Edition - When adding a new module, module name a…
Sben65 Aug 19, 2022
5dd1877
remove udeless code
Sben65 Aug 19, 2022
e84837f
resizing moduleDialog
Sben65 Aug 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ public async Task ModuleDialogTestMustBeRenderedOnShow()
{
//Arrange
var moduleName = Guid.NewGuid().ToString();
var moduleVersion = Guid.NewGuid().ToString();
var moduleImageUri = Guid.NewGuid().ToString();

var module = new IoTEdgeModule()
{
ModuleName = moduleName,
Version = moduleVersion,
Version = "1.0",
Status = "running",
ImageURI = moduleImageUri,
EnvironmentVariables = new List<IoTEdgeModuleEnvironmentVariable>(),
ModuleIdentityTwinSettings = new List<IoTEdgeModuleTwinSetting>(),
Commands = new List<IoTEdgeModuleCommand>()
Expand All @@ -51,7 +52,7 @@ public async Task ModuleDialogTestMustBeRenderedOnShow()

cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull());
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ModuleName)}").OuterHtml.Should().Contain(moduleName));
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.Version)}").OuterHtml.Should().Contain(moduleVersion));
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ImageURI)}").OuterHtml.Should().Contain(moduleImageUri));

// Assert
var tabs = cut.WaitForElements(".mud-tabs .mud-tab");
Expand All @@ -67,12 +68,14 @@ public async Task ClickOnSubmitShouldUpdateModuleValues()
//Arrange
var moduleName = Guid.NewGuid().ToString();
var moduleVersion = Guid.NewGuid().ToString();
var moduleImageUri = Guid.NewGuid().ToString();

var module = new IoTEdgeModule()
{
ModuleName = moduleName,
Version = moduleVersion,
Status = "running",
ImageURI = moduleImageUri,
EnvironmentVariables = new List<IoTEdgeModuleEnvironmentVariable>(),
ModuleIdentityTwinSettings = new List<IoTEdgeModuleTwinSetting>(),
Commands = new List<IoTEdgeModuleCommand>()
Expand All @@ -94,13 +97,13 @@ public async Task ClickOnSubmitShouldUpdateModuleValues()
cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull());

cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ModuleName)}").Change("newModuleNameValue"));
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.Version)}").Change("newModuleVersionValue"));
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ImageURI)}").Change("newModuleImageUriValue"));

var submitButton = cut.WaitForElement("#SubmitButton");
submitButton.Click();

cut.WaitForAssertion(() => module.ModuleName.Should().Be("newModuleNameValue"));
cut.WaitForAssertion(() => module.Version.Should().Be("newModuleVersionValue"));
cut.WaitForAssertion(() => module.ImageURI.Should().Be("newModuleImageUriValue"));
}

[Test]
Expand All @@ -109,12 +112,14 @@ public async Task ClickOnCancelShouldNotChangeModuleValues()
//Arrange
var moduleName = Guid.NewGuid().ToString();
var moduleVersion = Guid.NewGuid().ToString();
var moduleImageUri = Guid.NewGuid().ToString();

var module = new IoTEdgeModule()
{
ModuleName = moduleName,
Version = moduleVersion,
Status = "running",
ImageURI = moduleImageUri,
EnvironmentVariables = new List<IoTEdgeModuleEnvironmentVariable>(),
ModuleIdentityTwinSettings = new List<IoTEdgeModuleTwinSetting>(),
Commands = new List<IoTEdgeModuleCommand>()
Expand All @@ -136,13 +141,13 @@ public async Task ClickOnCancelShouldNotChangeModuleValues()
cut.WaitForAssertion(() => cut.Find("div.mud-dialog-container").Should().NotBeNull());

cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ModuleName)}").Change("newModuleNameValue"));
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.Version)}").Change("newModuleVersionValue"));
cut.WaitForAssertion(() => cut.Find($"#{nameof(IoTEdgeModule.ImageURI)}").Change("newModuleImageUriValue"));

var cancelButton = cut.WaitForElement("#CancelButton");
cancelButton.Click();

cut.WaitForAssertion(() => module.ModuleName.Should().Be(moduleName));
cut.WaitForAssertion(() => module.Version.Should().Be(moduleVersion));
cut.WaitForAssertion(() => module.ImageURI.Should().Be(moduleImageUri));
}
}
}
Loading