-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68ad87c
commit 80391ca
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace AzureIoTHub.Portal.Tests.E2E | ||
{ | ||
using AutoFixture; | ||
using AzureIoTHub.Portal.Tests.E2E.Pages; | ||
using NUnit.Framework; | ||
using NUnit.Framework.Internal; | ||
|
||
public class DeviceTags : E2ETest | ||
{ | ||
private LoginPage loginPage; | ||
|
||
[SetUp] | ||
public void SetUp() | ||
{ | ||
loginPage = new LoginPage(Configuration); | ||
|
||
loginPage.Login(); | ||
} | ||
|
||
[TearDown] | ||
public override void TearDown() | ||
{ | ||
loginPage.Logout(); | ||
|
||
base.TearDown(); | ||
} | ||
|
||
[Test] | ||
public void UserCanAddAndRemoveDeviceTag() | ||
{ | ||
var fixture = new Fixture(); | ||
|
||
var tagName = new string( | ||
fixture.CreateMany<char>(4) | ||
.Where(c => char.IsLetterOrDigit(c)) | ||
.ToArray() | ||
); | ||
|
||
var tagLabel = new string( | ||
fixture.CreateMany<char>(4) | ||
.Where(c => char.IsLetterOrDigit(c)) | ||
.ToArray() | ||
); | ||
|
||
var tag = new TagsPage(); | ||
|
||
tag.AddTag(tagName, tagLabel); | ||
|
||
tag.RemoveTag(tagName); | ||
} | ||
} | ||
} |