Browse Source

Merge pull request #8218 from Seraphym-Tuhai/allure

[3.5] Added epics, features and description on UI tests (Allure)
pull/8236/head
Andrew Shvayka 4 years ago
committed by GitHub
parent
commit
94f80eb46c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/base/AbstractDriverBaseTest.java
  2. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/AssetProfileEditMenuTest.java
  3. 22
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/CreateAssetProfileImportTest.java
  4. 32
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/CreateAssetProfileTest.java
  5. 30
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/DeleteAssetProfileTest.java
  6. 21
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/DeleteSeveralAssetProfilesTest.java
  7. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/MakeAssetProfileDefaultTest.java
  8. 7
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/SearchAssetProfileTest.java
  9. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/SortByNameTest.java
  10. 32
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/CreateCustomerTest.java
  11. 42
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/CustomerEditMenuTest.java
  12. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/DeleteCustomerTest.java
  13. 16
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/DeleteSeveralCustomerTest.java
  14. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersAssetsTest.java
  15. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersDashboardsTest.java
  16. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersDevicesTest.java
  17. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersEdgesTest.java
  18. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersUsersTest.java
  19. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/SearchCustomerTest.java
  20. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/SortByNameTest.java
  21. 22
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/CreateDeviceProfileImportTest.java
  22. 32
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/CreateDeviceProfileTest.java
  23. 31
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/DeleteDeviceProfileTest.java
  24. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/DeleteSeveralDeviceProfilesTest.java
  25. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/DeviceProfileEditMenuTest.java
  26. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/MakeDeviceProfileDefaultTest.java
  27. 7
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/SearchDeviceProfileTest.java
  28. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/SortByNameTest.java
  29. 24
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/CreateRuleChainImportTest.java
  30. 32
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/CreateRuleChainTest.java
  31. 43
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/DeleteRuleChainTest.java
  32. 27
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/DeleteSeveralRuleChainsTest.java
  33. 14
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/MakeRuleChainRootTest.java
  34. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/OpenRuleChainTest.java
  35. 22
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/RuleChainEditMenuTest.java
  36. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/SearchRuleChainTest.java
  37. 18
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/SortByNameTest.java
  38. 10
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/SortByTimeTest.java

3
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/base/AbstractDriverBaseTest.java

@ -49,6 +49,7 @@ import java.net.URL;
import java.time.Duration; import java.time.Duration;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.assertj.core.api.Assertions.fail;
import static org.thingsboard.server.msa.TestProperties.getBaseUiUrl; import static org.thingsboard.server.msa.TestProperties.getBaseUiUrl;
import static org.thingsboard.server.msa.ui.utils.Const.TENANT_EMAIL; import static org.thingsboard.server.msa.ui.utils.Const.TENANT_EMAIL;
import static org.thingsboard.server.msa.ui.utils.Const.TENANT_PASSWORD; import static org.thingsboard.server.msa.ui.utils.Const.TENANT_PASSWORD;
@ -122,7 +123,7 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest {
try { try {
wait.until(ExpectedConditions.urlContains(urlPath)); wait.until(ExpectedConditions.urlContains(urlPath));
} catch (WebDriverException e) { } catch (WebDriverException e) {
log.error("This URL path is missing"); return fail("URL not contains " + urlPath);
} }
return driver.getCurrentUrl().contains(urlPath); return driver.getCurrentUrl().contains(urlPath);
} }

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/AssetProfileEditMenuTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.openqa.selenium.Keys; import org.openqa.selenium.Keys;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
@ -54,8 +56,10 @@ public class AssetProfileEditMenuTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Asset profiles smoke")
@Feature("Edit asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Change name by edit menu")
public void changeName() { public void changeName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
String newName = "Changed" + getRandomNumber(); String newName = "Changed" + getRandomNumber();
@ -77,8 +81,10 @@ public class AssetProfileEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(nameAfter, newName); Assert.assertEquals(nameAfter, newName);
} }
@Epic("Asset profiles smoke")
@Feature("Edit asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Delete name and save")
public void deleteName() { public void deleteName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -92,8 +98,10 @@ public class AssetProfileEditMenuTest extends AbstractDriverBaseTest {
Assert.assertFalse(profilesPage.doneBtnEditViewVisible().isEnabled()); Assert.assertFalse(profilesPage.doneBtnEditViewVisible().isEnabled());
} }
@Epic("Asset profiles smoke")
@Feature("Edit asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Save only with space")
public void saveWithOnlySpaceInName() { public void saveWithOnlySpaceInName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -110,8 +118,10 @@ public class AssetProfileEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.warningMessage().getText(), EMPTY_ASSET_PROFILE_MESSAGE); Assert.assertEquals(profilesPage.warningMessage().getText(), EMPTY_ASSET_PROFILE_MESSAGE);
} }
@Epic("Asset profiles smoke")
@Feature("Edit asset profile")
@Test(priority = 30, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription") @Test(priority = 30, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription")
@Description @Description("Write the description and save the changes/Change the description and save the changes/Delete the description and save the changes")
public void editDescription(String description, String newDescription, String finalDescription) { public void editDescription(String description, String newDescription, String finalDescription) {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name, description)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name, description));

22
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/CreateAssetProfileImportTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -55,8 +57,10 @@ public class CreateAssetProfileImportTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Asset profiles smoke")
@Feature("Import asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import asset profile")
public void importAssetProfile() { public void importAssetProfile() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.openImportAssetProfileView(); profilesPage.openImportAssetProfileView();
@ -69,8 +73,10 @@ public class CreateAssetProfileImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entity(IMPORT_ASSET_PROFILE_NAME).isDisplayed()); Assert.assertTrue(profilesPage.entity(IMPORT_ASSET_PROFILE_NAME).isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Import asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import txt file")
public void importTxtFile() { public void importTxtFile() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openImportDeviceProfileView(); profilesPage.openImportDeviceProfileView();
@ -80,8 +86,10 @@ public class CreateAssetProfileImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.importingFile(EMPTY_IMPORT_MESSAGE).isDisplayed()); Assert.assertTrue(profilesPage.importingFile(EMPTY_IMPORT_MESSAGE).isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Import asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Drop json file and delete it")
public void addFileToImportAndRemove() { public void addFileToImportAndRemove() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.openImportAssetProfileView(); profilesPage.openImportAssetProfileView();
@ -93,8 +101,10 @@ public class CreateAssetProfileImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(IMPORT_ASSET_PROFILE_NAME)); Assert.assertTrue(profilesPage.entityIsNotPresent(IMPORT_ASSET_PROFILE_NAME));
} }
@Epic("Asset profiles smoke")
@Feature("Import asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import asset profile with same name")
public void importAssetProfileWithSameName() { public void importAssetProfileWithSameName() {
String name = IMPORT_ASSET_PROFILE_NAME; String name = IMPORT_ASSET_PROFILE_NAME;
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -111,8 +121,10 @@ public class CreateAssetProfileImportTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.warningMessage().getText(), SAME_NAME_WARNING_ASSET_PROFILE_MESSAGE); Assert.assertEquals(profilesPage.warningMessage().getText(), SAME_NAME_WARNING_ASSET_PROFILE_MESSAGE);
} }
@Epic("Asset profiles smoke")
@Feature("Import asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import asset profile without refresh")
public void importAssetProfileWithoutRefresh() { public void importAssetProfileWithoutRefresh() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.openImportAssetProfileView(); profilesPage.openImportAssetProfileView();

32
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/CreateAssetProfileTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -52,8 +54,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Add asset profile after specifying the name (text/numbers /special characters)")
public void createAssetProfile() { public void createAssetProfile() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
@ -68,8 +72,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entity(name).isDisplayed()); Assert.assertTrue(profilesPage.entity(name).isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add asset profile after specifying the name with details")
public void createAssetProfileWithDetails() { public void createAssetProfileWithDetails() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
String ruleChain = "Root Rule Chain"; String ruleChain = "Root Rule Chain";
@ -103,8 +109,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertEquals(description, profilesPage.getDescription()); Assert.assertEquals(description, profilesPage.getDescription());
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create asset profile with the same name")
public void createAssetProfileWithSameName() { public void createAssetProfileWithSameName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -122,8 +130,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.addAssetProfileView().isDisplayed()); Assert.assertTrue(profilesPage.addAssetProfileView().isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add asset profile without the name")
public void createAssetProfileWithoutName() { public void createAssetProfileWithoutName() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.openCreateAssetProfileView(); profilesPage.openCreateAssetProfileView();
@ -131,8 +141,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertFalse(profilesPage.addBtnV().isEnabled()); Assert.assertFalse(profilesPage.addBtnV().isEnabled());
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create asset profile only with spase in name")
public void createAssetProfileWithOnlySpaceInName() { public void createAssetProfileWithOnlySpaceInName() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.openCreateAssetProfileView(); profilesPage.openCreateAssetProfileView();
@ -146,8 +158,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.addAssetProfileView().isDisplayed()); Assert.assertTrue(profilesPage.addAssetProfileView().isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Add asset profile after specifying the name (text/numbers /special characters) without refresh")
public void createAssetProfileWithoutRefresh() { public void createAssetProfileWithoutRefresh() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
@ -161,8 +175,10 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entity(name).isDisplayed()); Assert.assertTrue(profilesPage.entity(name).isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Create asset profile")
@Test(priority = 40, groups = "smoke") @Test(priority = 40, groups = "smoke")
@Description @Description("Go to asset profile documentation page")
public void documentation() { public void documentation() {
String urlPath = "docs/user-guide/asset-profiles/"; String urlPath = "docs/user-guide/asset-profiles/";
@ -170,6 +186,6 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
profilesPage.profileNames().get(0).click(); profilesPage.profileNames().get(0).click();
profilesPage.goToProfileHelpPage(); profilesPage.goToProfileHelpPage();
Assert.assertTrue(urlContains(urlPath)); Assert.assertTrue(urlContains(urlPath), "URL not contains " + urlPath);
} }
} }

30
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/DeleteAssetProfileTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -40,8 +42,10 @@ public class DeleteAssetProfileTest extends AbstractDriverBaseTest {
profilesPage = new ProfilesPageHelper(driver); profilesPage = new ProfilesPageHelper(driver);
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove the asset profile by clicking on the trash icon in the right side of asset profile")
public void removeAssetProfile() { public void removeAssetProfile() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -54,8 +58,10 @@ public class DeleteAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(name)); Assert.assertTrue(profilesPage.entityIsNotPresent(name));
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove the asset profile by clicking on the 'Delete asset profile' btn in the entity view")
public void removeAssetProfileFromView() { public void removeAssetProfileFromView() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -69,8 +75,10 @@ public class DeleteAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(name)); Assert.assertTrue(profilesPage.entityIsNotPresent(name));
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove asset profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedAssetProfile() { public void removeSelectedAssetProfile() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -84,16 +92,20 @@ public class DeleteAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(name)); Assert.assertTrue(profilesPage.entityIsNotPresent(name));
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the default asset profile by clicking on the trash icon in the right side of asset profile")
public void removeDefaultAssetProfile() { public void removeDefaultAssetProfile() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled()); Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled());
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the Default asset profile by clicking on the 'Delete asset profile' btn in the entity view")
public void removeDefaultAssetProfileFromView() { public void removeDefaultAssetProfileFromView() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.entity("default").click(); profilesPage.entity("default").click();
@ -101,8 +113,10 @@ public class DeleteAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.deleteAssetProfileFromViewBtnIsNotDisplayed()); Assert.assertTrue(profilesPage.deleteAssetProfileFromViewBtnIsNotDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the default asset profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedDefaultAssetProfile() { public void removeSelectedDefaultAssetProfile() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
@ -110,8 +124,10 @@ public class DeleteAssetProfileTest extends AbstractDriverBaseTest {
Assert.assertFalse(profilesPage.presentCheckBox("default").isDisplayed()); Assert.assertFalse(profilesPage.presentCheckBox("default").isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Delete one asset profile")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove the asset profile by clicking on the trash icon in the right side of asset profile without refresh")
public void removeAssetProfileWithoutRefresh() { public void removeAssetProfileWithoutRefresh() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));

21
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/DeleteSeveralAssetProfilesTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -39,8 +41,10 @@ public class DeleteSeveralAssetProfilesTest extends AbstractDriverBaseTest {
profilesPage = new ProfilesPageHelper(driver); profilesPage = new ProfilesPageHelper(driver);
} }
@Epic("Asset profiles smoke")
@Feature("Delete several asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several asset profiles by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void canDeleteSeveralAssetProfilesByTopBtn() { public void canDeleteSeveralAssetProfilesByTopBtn() {
String name1 = ENTITY_NAME + random() + "1"; String name1 = ENTITY_NAME + random() + "1";
String name2 = ENTITY_NAME + random() + "2"; String name2 = ENTITY_NAME + random() + "2";
@ -57,8 +61,11 @@ public class DeleteSeveralAssetProfilesTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.profileIsNotPresent(name2)); Assert.assertTrue(profilesPage.profileIsNotPresent(name2));
} }
@Epic("Asset profiles smoke")
@Feature("Delete several asset profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several asset profiles by mark all the asset profiles on the page by clicking in the topmost " +
"checkbox and then clicking on the trash icon in the menu that appears")
public void selectAllDAssetProfiles() { public void selectAllDAssetProfiles() {
String name1 = ENTITY_NAME + random() + "1"; String name1 = ENTITY_NAME + random() + "1";
String name2 = ENTITY_NAME + random() +"2"; String name2 = ENTITY_NAME + random() +"2";
@ -75,8 +82,11 @@ public class DeleteSeveralAssetProfilesTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.profileIsNotPresent(name2)); Assert.assertTrue(profilesPage.profileIsNotPresent(name2));
} }
@Epic("Asset profiles smoke")
@Feature("Delete several asset profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the default asset profile by mark all the asset profiles on the page by clicking in the " +
"topmost checkbox and then clicking on the trash icon in the menu that appears")
public void removeDefaultAssetProfile() { public void removeDefaultAssetProfile() {
sideBarMenuView.openAssetProfiles(); sideBarMenuView.openAssetProfiles();
profilesPage.selectAllCheckBox().click(); profilesPage.selectAllCheckBox().click();
@ -85,8 +95,11 @@ public class DeleteSeveralAssetProfilesTest extends AbstractDriverBaseTest {
Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled()); Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled());
} }
@Epic("Asset profiles smoke")
@Feature("Delete several asset profile")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove several asset profiles by mark in the checkbox and then click on the trash can icon in the menu " +
"that appears at the top without refresh")
public void deleteSeveralAssetProfilesByTopBtnWithoutRefresh() { public void deleteSeveralAssetProfilesByTopBtnWithoutRefresh() {
String name1 = ENTITY_NAME + random() + "1"; String name1 = ENTITY_NAME + random() + "1";
String name2 = ENTITY_NAME + random() + "2"; String name2 = ENTITY_NAME + random() + "2";

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/MakeAssetProfileDefaultTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -47,8 +49,10 @@ public class MakeAssetProfileDefaultTest extends AbstractDriverBaseTest {
testRestClient.deleteAssetProfile(getAssetProfileByName(name).getId()); testRestClient.deleteAssetProfile(getAssetProfileByName(name).getId());
} }
@Epic("Asset profiles smoke")
@Feature("Make asset profile default")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Make asset profile default by clicking on the 'Make asset profile default' icon in the right corner")
public void makeDeviceProfileDefaultByRightCornerBtn() { public void makeDeviceProfileDefaultByRightCornerBtn() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
@ -61,8 +65,10 @@ public class MakeAssetProfileDefaultTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.defaultCheckbox(name).isDisplayed()); Assert.assertTrue(profilesPage.defaultCheckbox(name).isDisplayed());
} }
@Epic("Asset profiles smoke")
@Feature("Make asset profile default")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Make asset profile default by clicking on the 'Make asset profile default' button in the entity view")
public void makeDeviceProfileDefaultFromView() { public void makeDeviceProfileDefaultFromView() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));

7
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/SearchAssetProfileTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -48,8 +50,11 @@ public class SearchAssetProfileTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Asset profiles smoke")
@Feature("Search asset profile")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "assetProfileSearch") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "assetProfileSearch")
@Description @Description("Search asset profile by first word in the name/Search asset profile by second word in the name/" +
"Search asset profile by symbol in the name/Search asset profile by number in the name")
public void searchFirstWord(String name, String namePath) { public void searchFirstWord(String name, String namePath) {
testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name)); testRestClient.postAssetProfile(EntityPrototypes.defaultAssetProfile(name));
this.name = name; this.name = name;

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/assetProfileSmoke/SortByNameTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.assetProfileSmoke; package org.thingsboard.server.msa.ui.tests.assetProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -48,8 +50,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Asset profiles smoke")
@Feature("Sort by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort asset profile 'UP'")
public void specialCharacterUp(String name) { public void specialCharacterUp(String name) {
testRestClient.postAssetProfile(defaultAssetProfile(name)); testRestClient.postAssetProfile(defaultAssetProfile(name));
this.name = name; this.name = name;
@ -61,8 +65,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.getProfileName(), name); Assert.assertEquals(profilesPage.getProfileName(), name);
} }
@Epic("Asset profiles smoke")
@Feature("Sort by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort asset profile 'UP'")
public void allSortUp(String assetProfile, String assetProfileSymbol, String assetProfileNumber) { public void allSortUp(String assetProfile, String assetProfileSymbol, String assetProfileNumber) {
testRestClient.postAssetProfile(defaultAssetProfile(assetProfileSymbol)); testRestClient.postAssetProfile(defaultAssetProfile(assetProfileSymbol));
testRestClient.postAssetProfile(defaultAssetProfile(assetProfile)); testRestClient.postAssetProfile(defaultAssetProfile(assetProfile));
@ -86,8 +92,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(thirdAssetProfile, assetProfile); Assert.assertEquals(thirdAssetProfile, assetProfile);
} }
@Epic("Asset profiles smoke")
@Feature("Sort by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort asset profile 'DAWN'")
public void specialCharacterDown(String name) { public void specialCharacterDown(String name) {
testRestClient.postAssetProfile(defaultAssetProfile(name)); testRestClient.postAssetProfile(defaultAssetProfile(name));
this.name = name; this.name = name;
@ -99,8 +107,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.getProfileName(), name); Assert.assertEquals(profilesPage.getProfileName(), name);
} }
@Epic("Asset profiles smoke")
@Feature("Sort by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort asset profile 'DOWN'")
public void allSortDown(String assetProfile, String assetProfileSymbol, String assetProfileNumber) { public void allSortDown(String assetProfile, String assetProfileSymbol, String assetProfileNumber) {
testRestClient.postAssetProfile(defaultAssetProfile(assetProfileSymbol)); testRestClient.postAssetProfile(defaultAssetProfile(assetProfileSymbol));
testRestClient.postAssetProfile(defaultAssetProfile(assetProfile)); testRestClient.postAssetProfile(defaultAssetProfile(assetProfile));

32
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/CreateCustomerTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.openqa.selenium.Keys; import org.openqa.selenium.Keys;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
@ -52,8 +54,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Add customer specifying the name (text/numbers /special characters)")
public void createCustomer() { public void createCustomer() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
@ -68,8 +72,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customer(customerName).isDisplayed()); Assert.assertTrue(customerPage.customer(customerName).isDisplayed());
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add customer after specifying the name (text/numbers /special characters) with full information")
public void createCustomerWithFullInformation() { public void createCustomerWithFullInformation() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
String text = "Text"; String text = "Text";
@ -112,8 +118,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getCustomerCity(), text); Assert.assertEquals(customerPage.getCustomerCity(), text);
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add customer without the name")
public void createCustomerWithoutName() { public void createCustomerWithoutName() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.plusBtn().click(); customerPage.plusBtn().click();
@ -121,8 +129,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
Assert.assertFalse(customerPage.addBtnV().isEnabled()); Assert.assertFalse(customerPage.addBtnV().isEnabled());
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create customer only with spase in name")
public void createCustomerWithOnlySpace() { public void createCustomerWithOnlySpace() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.plusBtn().click(); customerPage.plusBtn().click();
@ -136,8 +146,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.addEntityView().isDisplayed()); Assert.assertTrue(customerPage.addEntityView().isDisplayed());
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create a customer with the same name")
public void createCustomerSameName() { public void createCustomerSameName() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -153,8 +165,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.addEntityView().isDisplayed()); Assert.assertTrue(customerPage.addEntityView().isDisplayed());
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add customer specifying the name (text/numbers /special characters) without refresh")
public void createCustomerWithoutRefresh() { public void createCustomerWithoutRefresh() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
@ -168,8 +182,10 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customer(customerName).isDisplayed()); Assert.assertTrue(customerPage.customer(customerName).isDisplayed());
} }
@Epic("Customers smoke tests")
@Feature("Create customer")
@Test(priority = 40, groups = "smoke") @Test(priority = 40, groups = "smoke")
@Description @Description("Go to customer documentation page")
public void documentation() { public void documentation() {
String urlPath = "docs/user-guide/ui/customers/"; String urlPath = "docs/user-guide/ui/customers/";
@ -178,6 +194,6 @@ public class CreateCustomerTest extends AbstractDriverBaseTest {
customerPage.customer(customerPage.getCustomerName()).click(); customerPage.customer(customerPage.getCustomerName()).click();
customerPage.goToHelpPage(); customerPage.goToHelpPage();
Assert.assertTrue(urlContains(urlPath)); Assert.assertTrue(urlContains(urlPath), "URL contains " + urlPath);
} }
} }

42
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/CustomerEditMenuTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -68,8 +70,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Change title by edit menu")
public void changeTitle() { public void changeTitle() {
String customerName = "Changed" + getRandomNumber(); String customerName = "Changed" + getRandomNumber();
testRestClient.postCustomer(defaultCustomerPrototype(ENTITY_NAME + random())); testRestClient.postCustomer(defaultCustomerPrototype(ENTITY_NAME + random()));
@ -89,8 +93,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(titleAfter, customerName); Assert.assertEquals(titleAfter, customerName);
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Delete title and save")
public void deleteTitle() { public void deleteTitle() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.entityTitles().get(0).click(); customerPage.entityTitles().get(0).click();
@ -100,8 +106,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertFalse(customerPage.doneBtnEditViewVisible().isEnabled()); Assert.assertFalse(customerPage.doneBtnEditViewVisible().isEnabled());
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Save only with space in title")
public void saveOnlyWithSpace() { public void saveOnlyWithSpace() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -117,8 +125,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getCustomerName(), customerPage.getHeaderName()); Assert.assertEquals(customerPage.getCustomerName(), customerPage.getHeaderName());
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription")
@Description @Description("Write the description and save the changes/Change the description and save the changes/Delete the description and save the changes")
public void editDescription(String description, String newDescription, String finalDescription) { public void editDescription(String description, String newDescription, String finalDescription) {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postCustomer(EntityPrototypes.defaultCustomerPrototype(name, description)); testRestClient.postCustomer(EntityPrototypes.defaultCustomerPrototype(name, description));
@ -134,8 +144,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getDescription(), finalDescription); Assert.assertEquals(customerPage.getDescription(), finalDescription);
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Assigned dashboard from dashboards page")
public void assignedDashboardFromDashboard() { public void assignedDashboardFromDashboard() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));
@ -161,8 +173,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getDashboardFromView(), dashboardPage.getDashboardTitle()); Assert.assertEquals(customerPage.getDashboardFromView(), dashboardPage.getDashboardTitle());
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Assigned dashboard")
public void assignedDashboard() { public void assignedDashboard() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));
@ -187,8 +201,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getDashboard(), customerPage.getDashboardFromView()); Assert.assertEquals(customerPage.getDashboard(), customerPage.getDashboardFromView());
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Assigned dashboard without hide")
public void assignedDashboardWithoutHide() { public void assignedDashboardWithoutHide() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));
@ -220,8 +236,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.timeBtn().isDisplayed()); Assert.assertTrue(customerPage.timeBtn().isDisplayed());
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add phone number")
public void addPhoneNumber() { public void addPhoneNumber() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));
@ -237,8 +255,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.phoneNumberEntityView().getAttribute("value").contains(number)); Assert.assertTrue(customerPage.phoneNumberEntityView().getAttribute("value").contains(number));
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "incorrectPhoneNumber") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "incorrectPhoneNumber")
@Description @Description("Add incorrect phone number")
public void addIncorrectPhoneNumber(String number) { public void addIncorrectPhoneNumber(String number) {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.entityTitles().get(0).click(); customerPage.entityTitles().get(0).click();
@ -251,8 +271,10 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.errorMessage().getText(), PHONE_NUMBER_ERROR_MESSAGE); Assert.assertEquals(customerPage.errorMessage().getText(), PHONE_NUMBER_ERROR_MESSAGE);
} }
@Epic("Customers smoke tests")
@Feature("Edit customer")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Add all information")
public void addAllInformation() { public void addAllInformation() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/DeleteCustomerTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -43,8 +45,10 @@ public class DeleteCustomerTest extends AbstractDriverBaseTest {
ruleChainsPage = new RuleChainsPageHelper(driver); ruleChainsPage = new RuleChainsPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Delete customer")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove the customer by clicking on the trash icon in the right side of refresh")
public void removeCustomerByRightSideBtn() { public void removeCustomerByRightSideBtn() {
String customer = ENTITY_NAME + random(); String customer = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customer)); testRestClient.postCustomer(defaultCustomerPrototype(customer));
@ -56,8 +60,10 @@ public class DeleteCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.entityIsNotPresent(deletedCustomer)); Assert.assertTrue(customerPage.entityIsNotPresent(deletedCustomer));
} }
@Epic("Customers smoke tests")
@Feature("Delete customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove customer by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedCustomer() { public void removeSelectedCustomer() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));
@ -69,8 +75,10 @@ public class DeleteCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedCustomer)); Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedCustomer));
} }
@Epic("Customers smoke tests")
@Feature("Delete customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the customer by clicking on the 'Delete customer' btn in the entity view")
public void removeFromCustomerView() { public void removeFromCustomerView() {
String customerName = ENTITY_NAME + random(); String customerName = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customerName)); testRestClient.postCustomer(defaultCustomerPrototype(customerName));
@ -84,8 +92,10 @@ public class DeleteCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.entityIsNotPresent(customerName)); Assert.assertTrue(customerPage.entityIsNotPresent(customerName));
} }
@Epic("Customers smoke tests")
@Feature("Delete customer")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the customer by clicking on the trash icon in the right side of customer without refresh")
public void removeCustomerByRightSideBtnWithoutRefresh() { public void removeCustomerByRightSideBtnWithoutRefresh() {
String customer = ENTITY_NAME + random(); String customer = ENTITY_NAME + random();
testRestClient.postCustomer(defaultCustomerPrototype(customer)); testRestClient.postCustomer(defaultCustomerPrototype(customer));

16
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/DeleteSeveralCustomerTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -40,8 +42,10 @@ public class DeleteSeveralCustomerTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Delete several customer")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several customers by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void canDeleteSeveralCustomersByTopBtn() { public void canDeleteSeveralCustomersByTopBtn() {
String title1 = ENTITY_NAME + random() + "1"; String title1 = ENTITY_NAME + random() + "1";
String title2 = ENTITY_NAME + random() + "2"; String title2 = ENTITY_NAME + random() + "2";
@ -56,8 +60,11 @@ public class DeleteSeveralCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customerIsNotPresent(title2)); Assert.assertTrue(customerPage.customerIsNotPresent(title2));
} }
@Epic("Customers smoke tests")
@Feature("Delete several customer")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several customers by mark all the Customers on the page by clicking in the topmost checkbox " +
"and then clicking on the trash icon in the menu that appears")
public void selectAllCustomers() { public void selectAllCustomers() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.selectAllCheckBox().click(); customerPage.selectAllCheckBox().click();
@ -68,8 +75,11 @@ public class DeleteSeveralCustomerTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.warningPopUpTitle().getText().contains(String.valueOf(customerPage.markCheckbox().size()))); Assert.assertTrue(customerPage.warningPopUpTitle().getText().contains(String.valueOf(customerPage.markCheckbox().size())));
} }
@Epic("Customers smoke tests")
@Feature("Delete several customer")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove several customers by mark in the checkbox and then click on the trash can icon in the menu " +
"that appears at the top without refresh")
public void deleteSeveralCustomersByTopBtnWithoutRefresh() { public void deleteSeveralCustomersByTopBtnWithoutRefresh() {
String title1 = ENTITY_NAME + random() + "1"; String title1 = ENTITY_NAME + random() + "1";
String title2 = ENTITY_NAME + random() + "2"; String title2 = ENTITY_NAME + random() + "2";

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersAssetsTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -37,8 +39,10 @@ public class ManageCustomersAssetsTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Manage customer assets")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by right corner btn")
public void openWindowByRightCornerBtn() { public void openWindowByRightCornerBtn() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -50,8 +54,10 @@ public class ManageCustomersAssetsTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(manage)); Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(manage));
} }
@Epic("Customers smoke tests")
@Feature("Manage customer assets")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by btn in entity view")
public void openWindowByView() { public void openWindowByView() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersDashboardsTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -36,8 +38,10 @@ public class ManageCustomersDashboardsTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Manage customer dashboards")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by right corner btn")
public void openWindowByRightCornerBtn() { public void openWindowByRightCornerBtn() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -49,8 +53,10 @@ public class ManageCustomersDashboardsTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(manage)); Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(manage));
} }
@Epic("Customers smoke tests")
@Feature("Manage customer dashboards")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by btn in entity view")
public void openWindowByView() { public void openWindowByView() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersDevicesTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -36,8 +38,10 @@ public class ManageCustomersDevicesTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Manage customer devices")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by right corner btn")
public void openWindowByRightCornerBtn() { public void openWindowByRightCornerBtn() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -49,8 +53,10 @@ public class ManageCustomersDevicesTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(manage)); Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(manage));
} }
@Epic("Customers smoke tests")
@Feature("Manage customer devices")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by btn in entity view")
public void openWindowByView() { public void openWindowByView() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersEdgesTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -37,8 +39,10 @@ public class ManageCustomersEdgesTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Manage customer edges")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by right corner btn")
public void openWindowByRightCornerBtn() { public void openWindowByRightCornerBtn() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -50,8 +54,10 @@ public class ManageCustomersEdgesTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(iconText)); Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(iconText));
} }
@Epic("Customers smoke tests")
@Feature("Manage customer edges")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by btn in entity view")
public void openWindowByView() { public void openWindowByView() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersUsersTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -37,8 +39,10 @@ public class ManageCustomersUsersTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Manage customer users")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by right corner btn")
public void openWindowByRightCornerBtn() { public void openWindowByRightCornerBtn() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();
@ -50,8 +54,10 @@ public class ManageCustomersUsersTest extends AbstractDriverBaseTest {
Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(iconText)); Assert.assertTrue(customerPage.customerManageWindowIconHead().getText().contains(iconText));
} }
@Epic("Customers smoke tests")
@Feature("Manage customer users")
@Test(groups = "smoke") @Test(groups = "smoke")
@Description @Description("Open manage window by btn in entity view")
public void openWindowByView() { public void openWindowByView() {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.setCustomerName(); customerPage.setCustomerName();

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/SearchCustomerTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -39,8 +41,10 @@ public class SearchCustomerTest extends AbstractDriverBaseTest {
customerPage = new CustomerPageHelper(driver); customerPage = new CustomerPageHelper(driver);
} }
@Epic("Customers smoke tests")
@Feature("Search customer")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "customerNameForSearchByFirstAndSecondWord") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "customerNameForSearchByFirstAndSecondWord")
@Description @Description("Search customer by first word in the name/*CHANGE TESTCASE*")
public void searchFirstWord(String namePath) { public void searchFirstWord(String namePath) {
sideBarMenuView.customerBtn().click(); sideBarMenuView.customerBtn().click();
customerPage.searchEntity(namePath); customerPage.searchEntity(namePath);
@ -48,8 +52,10 @@ public class SearchCustomerTest extends AbstractDriverBaseTest {
customerPage.allEntity().forEach(x -> Assert.assertTrue(x.getText().contains(namePath))); customerPage.allEntity().forEach(x -> Assert.assertTrue(x.getText().contains(namePath)));
} }
@Epic("Customers smoke tests")
@Feature("Search customer")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSearchBySymbolAndNumber") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSearchBySymbolAndNumber")
@Description @Description("Search customer by symbol in the name/Search customer by number in the name")
public void searchNumber(String name, String namePath) { public void searchNumber(String name, String namePath) {
testRestClient.postCustomer(defaultCustomerPrototype(name)); testRestClient.postCustomer(defaultCustomerPrototype(name));

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/SortByNameTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.customerSmoke; package org.thingsboard.server.msa.ui.tests.customerSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -48,8 +50,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Customers smoke tests")
@Feature("Sort customers by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort customers 'UP'")
public void specialCharacterUp(String title) { public void specialCharacterUp(String title) {
testRestClient.postCustomer(defaultCustomerPrototype(title)); testRestClient.postCustomer(defaultCustomerPrototype(title));
this.customerName = title; this.customerName = title;
@ -61,8 +65,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getCustomerName(), title); Assert.assertEquals(customerPage.getCustomerName(), title);
} }
@Epic("Customers smoke tests")
@Feature("Sort customers by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort customers 'UP'")
public void allSortUp(String customer, String customerSymbol, String customerNumber) { public void allSortUp(String customer, String customerSymbol, String customerNumber) {
testRestClient.postCustomer(defaultCustomerPrototype(customerSymbol)); testRestClient.postCustomer(defaultCustomerPrototype(customerSymbol));
testRestClient.postCustomer(defaultCustomerPrototype(customer)); testRestClient.postCustomer(defaultCustomerPrototype(customer));
@ -86,8 +92,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(thirdCustomer, customer); Assert.assertEquals(thirdCustomer, customer);
} }
@Epic("Customers smoke tests")
@Feature("Sort customers by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort customers 'DOWN'")
public void specialCharacterDown(String title) { public void specialCharacterDown(String title) {
testRestClient.postCustomer(defaultCustomerPrototype(title)); testRestClient.postCustomer(defaultCustomerPrototype(title));
customerName = title; customerName = title;
@ -99,8 +107,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(customerPage.getCustomerName(), title); Assert.assertEquals(customerPage.getCustomerName(), title);
} }
@Epic("Customers smoke tests")
@Feature("Sort customers by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort customers 'DOWN'")
public void allSortDown(String customer, String customerSymbol, String customerNumber) { public void allSortDown(String customer, String customerSymbol, String customerNumber) {
testRestClient.postCustomer(defaultCustomerPrototype(customerSymbol)); testRestClient.postCustomer(defaultCustomerPrototype(customerSymbol));
testRestClient.postCustomer(defaultCustomerPrototype(customer)); testRestClient.postCustomer(defaultCustomerPrototype(customer));

22
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/CreateDeviceProfileImportTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -55,8 +57,10 @@ public class CreateDeviceProfileImportTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Import device profile")
public void importDeviceProfile() { public void importDeviceProfile() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openImportDeviceProfileView(); profilesPage.openImportDeviceProfileView();
@ -69,8 +73,10 @@ public class CreateDeviceProfileImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entity(IMPORT_DEVICE_PROFILE_NAME).isDisplayed()); Assert.assertTrue(profilesPage.entity(IMPORT_DEVICE_PROFILE_NAME).isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import txt file")
public void importTxtFile() { public void importTxtFile() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openImportDeviceProfileView(); profilesPage.openImportDeviceProfileView();
@ -80,8 +86,10 @@ public class CreateDeviceProfileImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.importingFile(EMPTY_IMPORT_MESSAGE).isDisplayed()); Assert.assertTrue(profilesPage.importingFile(EMPTY_IMPORT_MESSAGE).isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Drop json file and delete it")
public void addFileTiImportAndRemove() { public void addFileTiImportAndRemove() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openImportDeviceProfileView(); profilesPage.openImportDeviceProfileView();
@ -93,8 +101,10 @@ public class CreateDeviceProfileImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(IMPORT_DEVICE_PROFILE_NAME)); Assert.assertTrue(profilesPage.entityIsNotPresent(IMPORT_DEVICE_PROFILE_NAME));
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import device profile with same name")
public void importDeviceProfileWithSameName() { public void importDeviceProfileWithSameName() {
String name = IMPORT_DEVICE_PROFILE_NAME; String name = IMPORT_DEVICE_PROFILE_NAME;
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -111,8 +121,10 @@ public class CreateDeviceProfileImportTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.warningMessage().getText(), SAME_NAME_WARNING_DEVICE_PROFILE_MESSAGE); Assert.assertEquals(profilesPage.warningMessage().getText(), SAME_NAME_WARNING_DEVICE_PROFILE_MESSAGE);
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Import device profile without refresh")
public void importDeviceProfileWithoutRefresh() { public void importDeviceProfileWithoutRefresh() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openImportDeviceProfileView(); profilesPage.openImportDeviceProfileView();

32
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/CreateDeviceProfileTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.openqa.selenium.Keys; import org.openqa.selenium.Keys;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
@ -54,8 +56,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Add device profile after specifying the name (text/numbers /special characters)")
public void createDeviceProfile() { public void createDeviceProfile() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
@ -70,8 +74,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entity(name).isDisplayed()); Assert.assertTrue(profilesPage.entity(name).isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add device profile after specifying the name with details")
public void createDeviceProfileWithDetails() { public void createDeviceProfileWithDetails() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
String ruleChain = "Root Rule Chain"; String ruleChain = "Root Rule Chain";
@ -105,8 +111,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertEquals(description, profilesPage.getDescription()); Assert.assertEquals(description, profilesPage.getDescription());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create a device profile with the same name")
public void createDeviseProfileWithSameName() { public void createDeviseProfileWithSameName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -124,8 +132,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.addDeviceProfileView().isDisplayed()); Assert.assertTrue(profilesPage.addDeviceProfileView().isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add device profile without the name")
public void createDeviceProfileWithoutName() { public void createDeviceProfileWithoutName() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openCreateDeviceProfileView(); profilesPage.openCreateDeviceProfileView();
@ -137,8 +147,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.errorMessage().getText(), NAME_IS_REQUIRED_MESSAGE); Assert.assertEquals(profilesPage.errorMessage().getText(), NAME_IS_REQUIRED_MESSAGE);
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create device profile only with spase in name")
public void createDeviseProfileWithOnlySpaceInName() { public void createDeviseProfileWithOnlySpaceInName() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.openCreateDeviceProfileView(); profilesPage.openCreateDeviceProfileView();
@ -152,8 +164,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.addDeviceProfileView().isDisplayed()); Assert.assertTrue(profilesPage.addDeviceProfileView().isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add device profile after specifying the name (text/numbers /special characters) without refresh")
public void createDeviceProfileWithoutRefresh() { public void createDeviceProfileWithoutRefresh() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
@ -167,8 +181,10 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entity(name).isDisplayed()); Assert.assertTrue(profilesPage.entity(name).isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Create device profile")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Go to device profile documentation page")
public void documentation() { public void documentation() {
String urlPath = "docs/user-guide/device-profiles/"; String urlPath = "docs/user-guide/device-profiles/";
@ -176,7 +192,7 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
profilesPage.profileNames().get(0).click(); profilesPage.profileNames().get(0).click();
profilesPage.goToProfileHelpPage(); profilesPage.goToProfileHelpPage();
Assert.assertTrue(urlContains(urlPath)); Assert.assertTrue(urlContains(urlPath), "URL contains " + urlPath);
} }
} }

31
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/DeleteDeviceProfileTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -40,8 +42,10 @@ public class DeleteDeviceProfileTest extends AbstractDriverBaseTest {
profilesPage = new ProfilesPageHelper(driver); profilesPage = new ProfilesPageHelper(driver);
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove the device profile by clicking on the trash icon in the right side of device profile")
public void removeDeviceProfile() { public void removeDeviceProfile() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -54,8 +58,10 @@ public class DeleteDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(name)); Assert.assertTrue(profilesPage.entityIsNotPresent(name));
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the device profile by clicking on the 'Delete device profile' btn in the entity view")
public void removeDeviceProfileFromView() { public void removeDeviceProfileFromView() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -69,8 +75,10 @@ public class DeleteDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(name)); Assert.assertTrue(profilesPage.entityIsNotPresent(name));
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove device profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedDeviceProfile() { public void removeSelectedDeviceProfile() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -84,16 +92,20 @@ public class DeleteDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.entityIsNotPresent(name)); Assert.assertTrue(profilesPage.entityIsNotPresent(name));
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the default device profile by clicking on the trash icon in the right side of device profile")
public void removeDefaultDeviceProfile() { public void removeDefaultDeviceProfile() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled()); Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled());
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the Default device profile by clicking on the 'Delete device profile' btn in the entity view")
public void removeDefaultDeviceProfileFromView() { public void removeDefaultDeviceProfileFromView() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.entity("default").click(); profilesPage.entity("default").click();
@ -101,17 +113,20 @@ public class DeleteDeviceProfileTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.deleteDeviceProfileFromViewBtnIsNotDisplayed()); Assert.assertTrue(profilesPage.deleteDeviceProfileFromViewBtnIsNotDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the default device profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedDefaultDeviceProfile() { public void removeSelectedDefaultDeviceProfile() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
Assert.assertNotNull(profilesPage.presentCheckBox("default")); Assert.assertNotNull(profilesPage.presentCheckBox("default"));
Assert.assertFalse(profilesPage.presentCheckBox("default").isDisplayed()); Assert.assertFalse(profilesPage.presentCheckBox("default").isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Delete one device profile")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove the device profile by clicking on the trash icon in the right side of device profile without refresh")
public void removeDeviceProfileWithoutRefresh() { public void removeDeviceProfileWithoutRefresh() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/DeleteSeveralDeviceProfilesTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -39,8 +41,10 @@ public class DeleteSeveralDeviceProfilesTest extends AbstractDriverBaseTest {
profilesPage = new ProfilesPageHelper(driver); profilesPage = new ProfilesPageHelper(driver);
} }
@Epic("Device profile smoke tests")
@Feature("Delete several device profiles")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several device profiles by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void canDeleteSeveralDeviceProfilesByTopBtn() { public void canDeleteSeveralDeviceProfilesByTopBtn() {
String name1 = ENTITY_NAME + random() + "1"; String name1 = ENTITY_NAME + random() + "1";
String name2 = ENTITY_NAME + random() + "2"; String name2 = ENTITY_NAME + random() + "2";
@ -57,8 +61,10 @@ public class DeleteSeveralDeviceProfilesTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.profileIsNotPresent(name2)); Assert.assertTrue(profilesPage.profileIsNotPresent(name2));
} }
@Epic("Device profile smoke tests")
@Feature("Delete several device profiles")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove several device profiles by mark all the device profiles on the page by clicking in the topmost checkbox and then clicking on the trash icon in the menu that appears")
public void selectAllDeviceProfiles() { public void selectAllDeviceProfiles() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.selectAllCheckBox().click(); profilesPage.selectAllCheckBox().click();
@ -69,8 +75,10 @@ public class DeleteSeveralDeviceProfilesTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.warningPopUpTitle().getText().contains(String.valueOf(profilesPage.markCheckbox().size()))); Assert.assertTrue(profilesPage.warningPopUpTitle().getText().contains(String.valueOf(profilesPage.markCheckbox().size())));
} }
@Epic("Device profile smoke tests")
@Feature("Delete several device profiles")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the default device profile by mark all the device profiles on the page by clicking in the topmost checkbox and then clicking on the trash icon in the menu that appears")
public void removeDefaultDeviceProfile() { public void removeDefaultDeviceProfile() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.selectAllCheckBox().click(); profilesPage.selectAllCheckBox().click();
@ -79,8 +87,10 @@ public class DeleteSeveralDeviceProfilesTest extends AbstractDriverBaseTest {
Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled()); Assert.assertFalse(profilesPage.deleteBtn("default").isEnabled());
} }
@Epic("Device profile smoke tests")
@Feature("Delete several device profiles")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove several device profiles by mark in the checkbox and then click on the trash can icon in the menu that appears at the top without refresh")
public void deleteSeveralDeviceProfilesByTopBtnWithoutRefresh() { public void deleteSeveralDeviceProfilesByTopBtnWithoutRefresh() {
String name1 = ENTITY_NAME + random() + "1"; String name1 = ENTITY_NAME + random() + "1";
String name2 = ENTITY_NAME + random() + "2"; String name2 = ENTITY_NAME + random() + "2";

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/DeviceProfileEditMenuTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.openqa.selenium.Keys; import org.openqa.selenium.Keys;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
@ -54,8 +56,10 @@ public class DeviceProfileEditMenuTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Device profile smoke tests")
@Feature("Edit device profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Change name by edit menu")
public void changeName() { public void changeName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
String newName = "Changed" + getRandomNumber(); String newName = "Changed" + getRandomNumber();
@ -77,8 +81,10 @@ public class DeviceProfileEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(titleAfter, newName); Assert.assertEquals(titleAfter, newName);
} }
@Epic("Device profile smoke tests")
@Feature("Edit device profile")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Delete name and save")
public void deleteName() { public void deleteName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -92,8 +98,10 @@ public class DeviceProfileEditMenuTest extends AbstractDriverBaseTest {
Assert.assertFalse(profilesPage.doneBtnEditViewVisible().isEnabled()); Assert.assertFalse(profilesPage.doneBtnEditViewVisible().isEnabled());
} }
@Epic("Device profile smoke tests")
@Feature("Edit device profile")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Save only with space in name")
public void saveWithOnlySpaceInName() { public void saveWithOnlySpaceInName() {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name));
@ -110,8 +118,10 @@ public class DeviceProfileEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.warningMessage().getText(), EMPTY_DEVICE_PROFILE_MESSAGE); Assert.assertEquals(profilesPage.warningMessage().getText(), EMPTY_DEVICE_PROFILE_MESSAGE);
} }
@Epic("Device profile smoke tests")
@Feature("Edit device profile")
@Test(priority = 30, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription") @Test(priority = 30, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription")
@Description @Description("Write the description and save the changes/Change the description and save the changes/Delete the description and save the changes")
public void editDescription(String description, String newDescription, String finalDescription) { public void editDescription(String description, String newDescription, String finalDescription) {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name, description)); testRestClient.postDeviceProfile(EntityPrototypes.defaultDeviceProfile(name, description));

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/MakeDeviceProfileDefaultTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -41,8 +43,10 @@ public class MakeDeviceProfileDefaultTest extends AbstractDriverBaseTest {
testRestClient.setDefaultDeviceProfile(getDeviceProfileByName("default").getId()); testRestClient.setDefaultDeviceProfile(getDeviceProfileByName("default").getId());
} }
@Epic("Device profile smoke tests")
@Feature("Make device profile default")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Make device profile default by clicking on the 'Make device profile default' icon in the right corner")
public void makeDeviceProfileDefaultByRightCornerBtn() { public void makeDeviceProfileDefaultByRightCornerBtn() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.setProfileName(); profilesPage.setProfileName();
@ -53,8 +57,10 @@ public class MakeDeviceProfileDefaultTest extends AbstractDriverBaseTest {
Assert.assertTrue(profilesPage.defaultCheckbox(profile).isDisplayed()); Assert.assertTrue(profilesPage.defaultCheckbox(profile).isDisplayed());
} }
@Epic("Device profile smoke tests")
@Feature("Make device profile default")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Make device profile default by clicking on the 'Make device profile default' button in the entity view")
public void makeDeviceProfileDefaultFromView() { public void makeDeviceProfileDefaultFromView() {
sideBarMenuView.openDeviceProfiles(); sideBarMenuView.openDeviceProfiles();
profilesPage.setProfileName(); profilesPage.setProfileName();

7
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/SearchDeviceProfileTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -49,8 +51,11 @@ public class SearchDeviceProfileTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Device profiles smoke")
@Feature("Search device profile")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "deviceProfileSearch") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "deviceProfileSearch")
@Description @Description("Search device profile by first word in the name/Search device profile by second word in the name/" +
"Search device profile by symbol in the name/Search asset profile by number in the name")
public void searchFirstWord(String name, String namePath) { public void searchFirstWord(String name, String namePath) {
testRestClient.postDeviceProfile(defaultDeviceProfile(name)); testRestClient.postDeviceProfile(defaultDeviceProfile(name));
this.name = name; this.name = name;

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/deviceProfileSmoke/SortByNameTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke; package org.thingsboard.server.msa.ui.tests.deviceProfileSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -48,8 +50,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Device profiles smoke")
@Feature("Sort device profile by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort device profile 'UP'")
public void specialCharacterUp(String name) { public void specialCharacterUp(String name) {
testRestClient.postDeviceProfile(defaultDeviceProfile(name)); testRestClient.postDeviceProfile(defaultDeviceProfile(name));
this.name = name; this.name = name;
@ -61,8 +65,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.getProfileName(), name); Assert.assertEquals(profilesPage.getProfileName(), name);
} }
@Epic("Device profiles smoke")
@Feature("Sort device profile by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort device profile 'UP'")
public void allSortUp(String deviceProfile, String deviceProfileSymbol, String deviceProfileNumber) { public void allSortUp(String deviceProfile, String deviceProfileSymbol, String deviceProfileNumber) {
testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfileSymbol)); testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfileSymbol));
testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfile)); testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfile));
@ -86,8 +92,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(thirdDeviceProfile, deviceProfile); Assert.assertEquals(thirdDeviceProfile, deviceProfile);
} }
@Epic("Device profiles smoke")
@Feature("Sort device profile by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort device profile 'DOWN'")
public void specialCharacterDown(String name) { public void specialCharacterDown(String name) {
testRestClient.postDeviceProfile(defaultDeviceProfile(name)); testRestClient.postDeviceProfile(defaultDeviceProfile(name));
this.name = name; this.name = name;
@ -99,8 +107,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(profilesPage.getProfileName(), name); Assert.assertEquals(profilesPage.getProfileName(), name);
} }
@Epic("Device profiles smoke")
@Feature("Sort device profile by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort device profile 'DOWN'")
public void allSortDown(String deviceProfile, String deviceProfileSymbol, String deviceProfileNumber) { public void allSortDown(String deviceProfile, String deviceProfileSymbol, String deviceProfileNumber) {
testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfileSymbol)); testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfileSymbol));
testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfile)); testRestClient.postDeviceProfile(defaultDeviceProfile(deviceProfile));

24
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/CreateRuleChainImportTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.openqa.selenium.WebElement; import org.openqa.selenium.WebElement;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
@ -59,8 +61,10 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Rule chains smoke tests")
@Feature("Import rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Drop json file")
public void importRuleChain() { public void importRuleChain() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.openImportRuleChainView(); ruleChainsPage.openImportRuleChainView();
@ -70,8 +74,10 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.importingFile(IMPORT_RULE_CHAIN_FILE_NAME).isDisplayed()); Assert.assertTrue(ruleChainsPage.importingFile(IMPORT_RULE_CHAIN_FILE_NAME).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Import rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Drop json file and delete it")
public void importRuleChainAndDeleteFile() { public void importRuleChainAndDeleteFile() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.openImportRuleChainView(); ruleChainsPage.openImportRuleChainView();
@ -83,8 +89,10 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(IMPORT_RULE_CHAIN_FILE_NAME)); Assert.assertTrue(ruleChainsPage.entityIsNotPresent(IMPORT_RULE_CHAIN_FILE_NAME));
} }
@Epic("Rule chains smoke tests")
@Feature("Import rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Import txt file")
public void importTxtFile() { public void importTxtFile() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.openImportRuleChainView(); ruleChainsPage.openImportRuleChainView();
@ -94,8 +102,10 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.importingFile(EMPTY_IMPORT_MESSAGE).isDisplayed()); Assert.assertTrue(ruleChainsPage.importingFile(EMPTY_IMPORT_MESSAGE).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Import rule chain")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Import rule chain")
public void importRuleChainAndSave() { public void importRuleChainAndSave() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.openImportRuleChainView(); ruleChainsPage.openImportRuleChainView();
@ -103,7 +113,6 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
ruleChainsPage.importBrowseFileBtn().click(); ruleChainsPage.importBrowseFileBtn().click();
WebElement doneBtn = openRuleChainPage.doneBtn(); WebElement doneBtn = openRuleChainPage.doneBtn();
doneBtn.click(); doneBtn.click();
//openRuleChainPage.waitUntilBtnDisable(doneBtn);
ruleChainName = IMPORT_RULE_CHAIN_NAME; ruleChainName = IMPORT_RULE_CHAIN_NAME;
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
@ -111,8 +120,10 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entity(IMPORT_RULE_CHAIN_NAME).isDisplayed()); Assert.assertTrue(ruleChainsPage.entity(IMPORT_RULE_CHAIN_NAME).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Import rule chain")
@Test(priority = 40, groups = "smoke") @Test(priority = 40, groups = "smoke")
@Description @Description("Import rule chain with same name")
public void importRuleChainAndSaveWithSameName() { public void importRuleChainAndSaveWithSameName() {
String ruleChainName = IMPORT_RULE_CHAIN_NAME; String ruleChainName = IMPORT_RULE_CHAIN_NAME;
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
@ -124,7 +135,6 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
ruleChainsPage.importBrowseFileBtn().click(); ruleChainsPage.importBrowseFileBtn().click();
WebElement doneBtn = openRuleChainPage.doneBtn(); WebElement doneBtn = openRuleChainPage.doneBtn();
doneBtn.click(); doneBtn.click();
//openRuleChainPage.waitUntilBtnDisable(doneBtn);
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
boolean entityNotNull = ruleChainsPage.entity(ruleChainName) != null; boolean entityNotNull = ruleChainsPage.entity(ruleChainName) != null;

32
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/CreateRuleChainTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -53,8 +55,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Add rule chain after specifying the name (text/numbers /special characters)")
public void createRuleChain() { public void createRuleChain() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
@ -70,8 +74,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entity(ruleChainName).isDisplayed()); Assert.assertTrue(ruleChainsPage.entity(ruleChainName).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Add rule chain after specifying the name and description (text/numbers /special characters)")
public void createRuleChainWithDescription() { public void createRuleChainWithDescription() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
@ -89,8 +95,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.descriptionEntityView().getAttribute("value"), ruleChainName); Assert.assertEquals(ruleChainsPage.descriptionEntityView().getAttribute("value"), ruleChainName);
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Add rule chain without the name")
public void createRuleChainWithoutName() { public void createRuleChainWithoutName() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.openCreateRuleChainView(); ruleChainsPage.openCreateRuleChainView();
@ -98,8 +106,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
Assert.assertFalse(ruleChainsPage.addBtnV().isEnabled()); Assert.assertFalse(ruleChainsPage.addBtnV().isEnabled());
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create rule chain only with spase in name")
public void createRuleChainWithOnlySpace() { public void createRuleChainWithOnlySpace() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.openCreateRuleChainView(); ruleChainsPage.openCreateRuleChainView();
@ -113,8 +123,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.addEntityView().isDisplayed()); Assert.assertTrue(ruleChainsPage.addEntityView().isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Create a rule chain with the same name")
public void createRuleChainWithSameName() { public void createRuleChainWithSameName() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(ruleChainName));
@ -138,8 +150,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
entityIsDisplayed.forEach(Assert::assertTrue); entityIsDisplayed.forEach(Assert::assertTrue);
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Add rule chain after specifying the name (text/numbers /special characters) without refresh")
public void createRuleChainWithoutRefresh() { public void createRuleChainWithoutRefresh() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
@ -153,8 +167,10 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entity(ruleChainName).isDisplayed()); Assert.assertTrue(ruleChainsPage.entity(ruleChainName).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Create rule chain")
@Test(priority = 40, groups = "smoke") @Test(priority = 40, groups = "smoke")
@Description @Description("Go to rule chain documentation page")
public void documentation() { public void documentation() {
String urlPath = "docs/user-guide/ui/rule-chains/"; String urlPath = "docs/user-guide/ui/rule-chains/";
@ -163,6 +179,6 @@ public class CreateRuleChainTest extends AbstractDriverBaseTest {
ruleChainsPage.detailsBtn(ruleChainsPage.getRuleChainName()).click(); ruleChainsPage.detailsBtn(ruleChainsPage.getRuleChainName()).click();
ruleChainsPage.goToHelpPage(); ruleChainsPage.goToHelpPage();
Assert.assertTrue(urlContains(urlPath)); Assert.assertTrue(urlContains(urlPath), "URL contains " + urlPath);
} }
} }

43
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/DeleteRuleChainTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -41,8 +43,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
ruleChainsPage = new RuleChainsPageHelper(driver); ruleChainsPage = new RuleChainsPageHelper(driver);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove the rule chain by clicking on the trash icon in the right side of rule chain")
public void removeRuleChainByRightSideBtn() { public void removeRuleChainByRightSideBtn() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
@ -54,8 +58,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain)); Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain));
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove rule chain by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedRuleChain() { public void removeSelectedRuleChain() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
@ -67,8 +73,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain)); Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain));
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the rule chain by clicking on the 'Delete rule chain' btn in the entity view")
public void removeFromRuleChainView() { public void removeFromRuleChainView() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
@ -81,34 +89,41 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain)); Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain));
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the root rule chain by clicking on the trash icon in the right side of rule chain")
public void removeRootRuleChain() { public void removeRootRuleChain() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
Assert.assertFalse(ruleChainsPage.deleteBtn(ROOT_RULE_CHAIN_NAME).isEnabled()); Assert.assertFalse(ruleChainsPage.deleteBtn(ROOT_RULE_CHAIN_NAME).isEnabled());
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove root rule chain by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedRootRuleChain() { public void removeSelectedRootRuleChain() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.assertCheckBoxIsNotDisplayed(ROOT_RULE_CHAIN_NAME); ruleChainsPage.assertCheckBoxIsNotDisplayed(ROOT_RULE_CHAIN_NAME);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the root rule chain by clicking on the 'Delete rule chain' btn in the entity view")
public void removeFromRootRuleChainView() { public void removeFromRootRuleChainView() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.detailsBtn(ROOT_RULE_CHAIN_NAME).click(); ruleChainsPage.detailsBtn(ROOT_RULE_CHAIN_NAME).click();
ruleChainsPage.deleteBtnFromView();
Assert.assertTrue(ruleChainsPage.deleteBtnInRootRuleChainIsNotDisplayed()); Assert.assertTrue(ruleChainsPage.deleteBtnInRootRuleChainIsNotDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove the rule chain with device profile by clicking on the trash icon in the right side of rule chain")
public void removeProfileRuleChainByRightSideBtn() { public void removeProfileRuleChainByRightSideBtn() {
String deletedRuleChain = "Thermostat"; String deletedRuleChain = "Thermostat";
@ -124,8 +139,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.warningMessage().getText(), DELETE_RULE_CHAIN_WITH_PROFILE_MESSAGE); Assert.assertEquals(ruleChainsPage.warningMessage().getText(), DELETE_RULE_CHAIN_WITH_PROFILE_MESSAGE);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the rule chain with device profile by mark in the checkbox and then click on the trash can icon in the menu that appears at the top")
public void removeSelectedProfileRuleChain() { public void removeSelectedProfileRuleChain() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
String deletedRuleChain = ruleChainsPage.deleteSelected("Thermostat"); String deletedRuleChain = ruleChainsPage.deleteSelected("Thermostat");
@ -138,8 +155,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.warningMessage().getText(), DELETE_RULE_CHAIN_WITH_PROFILE_MESSAGE); Assert.assertEquals(ruleChainsPage.warningMessage().getText(), DELETE_RULE_CHAIN_WITH_PROFILE_MESSAGE);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the rule chain with device profile by clicking on the 'Delete rule chain' btn in the entity view")
public void removeFromProfileRuleChainView() { public void removeFromProfileRuleChainView() {
String deletedRuleChain = "Thermostat"; String deletedRuleChain = "Thermostat";
@ -154,8 +173,10 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.warningMessage().getText(), DELETE_RULE_CHAIN_WITH_PROFILE_MESSAGE); Assert.assertEquals(ruleChainsPage.warningMessage().getText(), DELETE_RULE_CHAIN_WITH_PROFILE_MESSAGE);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete rule chain")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove the rule chain by clicking on the trash icon in the right side of rule chain without refresh")
public void removeRuleChainByRightSideBtnWithoutRefresh() { public void removeRuleChainByRightSideBtnWithoutRefresh() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));

27
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/DeleteSeveralRuleChainsTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -41,8 +43,11 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
ruleChainsPage = new RuleChainsPageHelper(driver); ruleChainsPage = new RuleChainsPageHelper(driver);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete several rule chains")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several rule chains by mark in the checkbox and then click on the trash can icon in the menu " +
"that appears at the top")
public void canDeleteSeveralRuleChainsByTopBtn() { public void canDeleteSeveralRuleChainsByTopBtn() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName + 1)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName + 1));
@ -55,8 +60,11 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.ruleChainsIsNotPresent(ruleChainName)); Assert.assertTrue(ruleChainsPage.ruleChainsIsNotPresent(ruleChainName));
} }
@Epic("Rule chains smoke tests")
@Feature("Delete several rule chains")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Remove several rule chains by mark all the rule chains on the page by clicking in the topmost checkbox" +
" and then clicking on the trash icon in the menu that appears")
public void selectAllRuleChain() { public void selectAllRuleChain() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName + 1)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName + 1));
@ -71,8 +79,11 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.ruleChainsIsNotPresent(ruleChainName)); Assert.assertTrue(ruleChainsPage.ruleChainsIsNotPresent(ruleChainName));
} }
@Epic("Rule chains smoke tests")
@Feature("Delete several rule chains")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the root rule chain by mark in the checkbox and then click on the trash can icon in the menu " +
"that appears at the top")
public void removeRootRuleChain() { public void removeRootRuleChain() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.selectAllCheckBox().click(); ruleChainsPage.selectAllCheckBox().click();
@ -80,8 +91,11 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
Assert.assertFalse(ruleChainsPage.deleteBtn(ROOT_RULE_CHAIN_NAME).isEnabled()); Assert.assertFalse(ruleChainsPage.deleteBtn(ROOT_RULE_CHAIN_NAME).isEnabled());
} }
@Epic("Rule chains smoke tests")
@Feature("Delete several rule chains")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Remove the root rule chain by mark all the rule chains on the page by clicking in the topmost checkbox" +
" and then clicking on the trash icon in the menu that appears")
public void removeSelectedRootRuleChain() { public void removeSelectedRootRuleChain() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.selectAllCheckBox().click(); ruleChainsPage.selectAllCheckBox().click();
@ -89,8 +103,11 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
ruleChainsPage.assertCheckBoxIsNotDisplayed(ROOT_RULE_CHAIN_NAME); ruleChainsPage.assertCheckBoxIsNotDisplayed(ROOT_RULE_CHAIN_NAME);
} }
@Epic("Rule chains smoke tests")
@Feature("Delete several rule chains")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Remove several rule chains by mark in the checkbox and then click on the trash can icon in the menu " +
"that appears at the top without refresh")
public void deleteSeveralRuleChainsByTopBtnWithoutRefresh() { public void deleteSeveralRuleChainsByTopBtnWithoutRefresh() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName + 1)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName + 1));

14
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/MakeRuleChainRootTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -42,8 +44,10 @@ public class MakeRuleChainRootTest extends AbstractDriverBaseTest {
testRestClient.setRootRuleChain(getRuleChainByName("Root Rule Chain").getId()); testRestClient.setRootRuleChain(getRuleChainByName("Root Rule Chain").getId());
} }
@Epic("Rule chains smoke tests")
@Feature("Make rule chain root")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Make rule chain root by clicking on the 'Make rule chain root' icon in the right corner")
public void makeRuleChainRootByRightCornerBtn() { public void makeRuleChainRootByRightCornerBtn() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.setRuleChainNameWithoutRoot(0); ruleChainsPage.setRuleChainNameWithoutRoot(0);
@ -54,8 +58,10 @@ public class MakeRuleChainRootTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.rootCheckBoxEnable(ruleChain).isDisplayed()); Assert.assertTrue(ruleChainsPage.rootCheckBoxEnable(ruleChain).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Make rule chain root")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Make rule chain root by clicking on the 'Make rule chain root' button in the entity view")
public void makeRuleChainRootFromView() { public void makeRuleChainRootFromView() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.setRuleChainNameWithoutRoot(0); ruleChainsPage.setRuleChainNameWithoutRoot(0);
@ -68,8 +74,10 @@ public class MakeRuleChainRootTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.rootCheckBoxEnable(ruleChain).isDisplayed()); Assert.assertTrue(ruleChainsPage.rootCheckBoxEnable(ruleChain).isDisplayed());
} }
@Epic("Rule chains smoke tests")
@Feature("Make rule chain root")
@Test(priority = 30, groups = "smoke") @Test(priority = 30, groups = "smoke")
@Description @Description("Make multiple root rule chains (only one rule chain can be root)")
public void multiplyRoot() { public void multiplyRoot() {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.setRuleChainNameWithoutRoot(0); ruleChainsPage.setRuleChainNameWithoutRoot(0);

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/OpenRuleChainTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -53,8 +55,10 @@ public class OpenRuleChainTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Rule chains smoke tests")
@Feature("Open rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Open the rule chain by clicking on its name")
public void openRuleChainByRightCornerBtn() { public void openRuleChainByRightCornerBtn() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(ruleChainName));
@ -70,8 +74,10 @@ public class OpenRuleChainTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainName, openRuleChainPage.getHeadName()); Assert.assertEquals(ruleChainName, openRuleChainPage.getHeadName());
} }
@Epic("Rule chains smoke tests")
@Feature("Open rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Open the rule chain by clicking on the 'Open rule chain' button in the entity view")
public void openRuleChainByViewBtn() { public void openRuleChainByViewBtn() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(ruleChainName));

22
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/RuleChainEditMenuTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -54,8 +56,10 @@ public class RuleChainEditMenuTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Rule chains smoke tests")
@Feature("Edit rule chain")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Change name by edit menu")
public void changeName() { public void changeName() {
String newRuleChainName = "Changed" + getRandomNumber(); String newRuleChainName = "Changed" + getRandomNumber();
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
@ -77,8 +81,10 @@ public class RuleChainEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(newRuleChainName, nameAfter); Assert.assertEquals(newRuleChainName, nameAfter);
} }
@Epic("Rule chains smoke tests")
@Feature("Edit rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Delete name and save")
public void deleteName() { public void deleteName() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
@ -92,8 +98,10 @@ public class RuleChainEditMenuTest extends AbstractDriverBaseTest {
Assert.assertFalse(ruleChainsPage.doneBtnEditViewVisible().isEnabled()); Assert.assertFalse(ruleChainsPage.doneBtnEditViewVisible().isEnabled());
} }
@Epic("Rule chains smoke tests")
@Feature("Edit rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Save only with space")
public void saveOnlyWithSpace() { public void saveOnlyWithSpace() {
String ruleChainName = ENTITY_NAME +random(); String ruleChainName = ENTITY_NAME +random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
@ -110,8 +118,10 @@ public class RuleChainEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.warningMessage().getText(), EMPTY_RULE_CHAIN_MESSAGE); Assert.assertEquals(ruleChainsPage.warningMessage().getText(), EMPTY_RULE_CHAIN_MESSAGE);
} }
@Epic("Rule chains smoke tests")
@Feature("Edit rule chain")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "editMenuDescription")
@Description @Description("Write the description and save the changes/Change the description and save the changes/Delete the description and save the changes")
public void editDescription(String description, String newDescription, String finalDescription) { public void editDescription(String description, String newDescription, String finalDescription) {
String name = ENTITY_NAME + random(); String name = ENTITY_NAME + random();
testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(name, description)); testRestClient.postRuleChain(EntityPrototypes.defaultRuleChainPrototype(name, description));
@ -127,8 +137,10 @@ public class RuleChainEditMenuTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.getDescription(), finalDescription); Assert.assertEquals(ruleChainsPage.getDescription(), finalDescription);
} }
@Epic("Rule chains smoke tests")
@Feature("Edit rule chain")
@Test(priority = 20, groups = "smoke") @Test(priority = 20, groups = "smoke")
@Description @Description("Enable debug mode/Disable debug mode")
public void debugMode() { public void debugMode() {
String ruleChainName = ENTITY_NAME + random(); String ruleChainName = ENTITY_NAME + random();
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/SearchRuleChainTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -39,8 +41,10 @@ public class SearchRuleChainTest extends AbstractDriverBaseTest {
ruleChainsPage = new RuleChainsPageHelper(driver); ruleChainsPage = new RuleChainsPageHelper(driver);
} }
@Epic("Rule chains smoke tests")
@Feature("Search rule chain")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "ruleChainNameForSearchByFirstAndSecondWord") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "ruleChainNameForSearchByFirstAndSecondWord")
@Description @Description("Search rule chain by first word in the name/Search rule chain by second word in the name")
public void searchFirstWord(String namePath) { public void searchFirstWord(String namePath) {
sideBarMenuView.ruleChainsBtn().click(); sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.searchEntity(namePath); ruleChainsPage.searchEntity(namePath);
@ -49,8 +53,10 @@ public class SearchRuleChainTest extends AbstractDriverBaseTest {
Assert.assertTrue(ruleChainsPage.getRuleChainName().contains(namePath)); Assert.assertTrue(ruleChainsPage.getRuleChainName().contains(namePath));
} }
@Epic("Rule chains smoke tests")
@Feature("Search rule chain")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSearchBySymbolAndNumber") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSearchBySymbolAndNumber")
@Description @Description("Search rule chain by symbol in the name/Search rule chain by number in the name")
public void searchNumber(String name, String namePath) { public void searchNumber(String name, String namePath) {
testRestClient.postRuleChain(defaultRuleChainPrototype(name)); testRestClient.postRuleChain(defaultRuleChainPrototype(name));

18
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/SortByNameTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -49,8 +51,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Rule chains smoke tests")
@Feature("Sort rule chain by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort rule chain 'UP'")
public void specialCharacterUp(String ruleChainName) { public void specialCharacterUp(String ruleChainName) {
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
this.ruleChainName = ruleChainName; this.ruleChainName = ruleChainName;
@ -62,8 +66,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.getRuleChainName(), ruleChainName); Assert.assertEquals(ruleChainsPage.getRuleChainName(), ruleChainName);
} }
@Epic("Rule chains smoke tests")
@Feature("Sort rule chain by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort rule chain 'UP'")
public void allSortUp(String ruleChain, String ruleChainSymbol, String ruleChainNumber) { public void allSortUp(String ruleChain, String ruleChainSymbol, String ruleChainNumber) {
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainSymbol)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainSymbol));
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain));
@ -87,8 +93,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(thirdRuleChain, ruleChain); Assert.assertEquals(thirdRuleChain, ruleChain);
} }
@Epic("Rule chains smoke tests")
@Feature("Sort rule chain by name")
@Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort") @Test(priority = 10, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForSort")
@Description @Description("Sort rule chain 'DOWN'")
public void specialCharacterDown(String ruleChainName) { public void specialCharacterDown(String ruleChainName) {
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
this.ruleChainName = ruleChainName; this.ruleChainName = ruleChainName;
@ -100,8 +108,10 @@ public class SortByNameTest extends AbstractDriverBaseTest {
Assert.assertEquals(ruleChainsPage.getRuleChainName(), ruleChainName); Assert.assertEquals(ruleChainsPage.getRuleChainName(), ruleChainName);
} }
@Epic("Rule chains smoke tests")
@Feature("Sort rule chain by name")
@Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort") @Test(priority = 20, groups = "smoke", dataProviderClass = DataProviderCredential.class, dataProvider = "nameForAllSort")
@Description @Description("Sort rule chain 'DOWN'")
public void allSortDown(String ruleChain, String ruleChainSymbol, String ruleChainNumber) { public void allSortDown(String ruleChain, String ruleChainSymbol, String ruleChainNumber) {
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainSymbol)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainSymbol));
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain));

10
msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/ruleChainsSmoke/SortByTimeTest.java

@ -16,6 +16,8 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke; package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description; import io.qameta.allure.Description;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
@ -49,8 +51,10 @@ public class SortByTimeTest extends AbstractDriverBaseTest {
} }
} }
@Epic("Rule chains smoke tests")
@Feature("Sort rule chain by time")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Sort rule chain 'DOWN'")
public void sortByTimeDown() { public void sortByTimeDown() {
String ruleChain = ENTITY_NAME; String ruleChain = ENTITY_NAME;
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain));
@ -65,8 +69,10 @@ public class SortByTimeTest extends AbstractDriverBaseTest {
Assert.assertNotNull(ruleChainsPage.createdTimeEntity(ruleChain, lastCreated)); Assert.assertNotNull(ruleChainsPage.createdTimeEntity(ruleChain, lastCreated));
} }
@Epic("Rule chains smoke tests")
@Feature("Sort rule chain by time")
@Test(priority = 10, groups = "smoke") @Test(priority = 10, groups = "smoke")
@Description @Description("Sort rule chain 'UP'")
public void sortByTimeUp() { public void sortByTimeUp() {
String ruleChain = ENTITY_NAME; String ruleChain = ENTITY_NAME;
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain)); testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChain));

Loading…
Cancel
Save