|
|
@ -61,36 +61,37 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Set the temperature level.",
|
|
|
|
@Test(description = "Set the temperature level.",
|
|
|
|
groups = {"iot.sample.verify"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = "iot.enroll.verify")
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY)
|
|
|
|
public void setTemperatureTest() {
|
|
|
|
public void setTemperatureTest() {
|
|
|
|
Assert.assertTrue(sampleViewPage.changeTemperature(Constants.IOT_CONNECTED_CUP_TEMPERATURE));
|
|
|
|
Assert.assertTrue(sampleViewPage.changeTemperature(Constants.IOT_CONNECTED_CUP_TEMPERATURE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Set the coffee level.",
|
|
|
|
@Test(description = "Set the coffee level.",
|
|
|
|
groups = {"iot.sample.verify"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = "iot.enroll.verify")
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY)
|
|
|
|
public void setCoffeeLevelTest() throws IOException {
|
|
|
|
public void setCoffeeLevelTest() throws IOException {
|
|
|
|
Assert.assertTrue(sampleViewPage.changeCoffeeLevel(Constants.IOT_CONNECTED_CUP_LEVEl));
|
|
|
|
Assert.assertTrue(sampleViewPage.changeCoffeeLevel(Constants.IOT_CONNECTED_CUP_LEVEl));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Verify order coffee function.",
|
|
|
|
@Test(description = "Verify order coffee function.",
|
|
|
|
groups = {"iot.sample.verify"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = "iot.enroll.verify")
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY)
|
|
|
|
public void orderCoffeeTest() throws IOException, InterruptedException {
|
|
|
|
public void orderCoffeeTest() throws IOException, InterruptedException {
|
|
|
|
Assert.assertTrue(sampleViewPage.orderCoffee());
|
|
|
|
Assert.assertTrue(sampleViewPage.orderCoffee());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the graphs are present in device view.",
|
|
|
|
@Test(description = "Test the graphs are present in device view.",
|
|
|
|
groups = {"iot.sample.verify"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnMethods = {"setTemperatureTest", "setCoffeeLevelTest", "orderCoffeeTest"})
|
|
|
|
dependsOnMethods = {"setTemperatureTest", "setCoffeeLevelTest", "orderCoffeeTest"})
|
|
|
|
public void verifyGraphs() throws IOException {
|
|
|
|
public void verifyGraphs() throws IOException {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.isGraphsAvailable(2));
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.isGraphsAvailable(2));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the Y axis name of Temperature graph.",
|
|
|
|
@Test(description = "Test the Y axis name of Temperature graph.",
|
|
|
|
groups = {"iot.sample.verify", "sample.temp"},
|
|
|
|
groups = {Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = {"iot.enroll.verify"},
|
|
|
|
Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE},
|
|
|
|
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY,
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
public void temperatureGraphYAxisNameTest() throws IOException {
|
|
|
|
public void temperatureGraphYAxisNameTest() throws IOException {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_Y_AXIS,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_Y_AXIS,
|
|
|
@ -99,8 +100,9 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the X axis name of Temperature graph.",
|
|
|
|
@Test(description = "Test the X axis name of Temperature graph.",
|
|
|
|
groups = {"iot.sample.verify", "sample.temp"},
|
|
|
|
groups = {Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = {"iot.enroll.verify"},
|
|
|
|
Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE},
|
|
|
|
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY,
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
public void temperatureGraphXAxisNameTest() throws IOException {
|
|
|
|
public void temperatureGraphXAxisNameTest() throws IOException {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_X_AXIS,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_X_AXIS,
|
|
|
@ -109,8 +111,9 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph legend is present.",
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph legend is present.",
|
|
|
|
groups = {"iot.sample.verify", "sample.temp"},
|
|
|
|
groups = {Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = {"iot.enroll.verify"},
|
|
|
|
Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE},
|
|
|
|
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY,
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
public void temperatureGraphLegendTest() {
|
|
|
|
public void temperatureGraphLegendTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphLegendName(Constants.IOT_CONNECTED_CUP_TEMPERATURE_ID,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphLegendName(Constants.IOT_CONNECTED_CUP_TEMPERATURE_ID,
|
|
|
@ -118,16 +121,18 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the whether the Temperature graph path is visible.",
|
|
|
|
@Test(description = "Test the whether the Temperature graph path is visible.",
|
|
|
|
groups = {"iot.sample.verify", "sample.temp"},
|
|
|
|
groups = {Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = {"iot.enroll.verify"},
|
|
|
|
Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE},
|
|
|
|
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY,
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
public void temperatureGraphPathTest() {
|
|
|
|
public void temperatureGraphPathTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphPath(Constants.IOT_CONNECTED_CUP_TEMPERATURE_GRAPH_ID));
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphPath(Constants.IOT_CONNECTED_CUP_TEMPERATURE_GRAPH_ID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the whether the Temperature graph gets values.",
|
|
|
|
@Test(description = "Test the whether the Temperature graph gets values.",
|
|
|
|
groups = {"iot.sample.verify", "sample.temp"},
|
|
|
|
groups = {Constants.IOT_TEST_GROUP_SAMPLE_VERIFY,
|
|
|
|
dependsOnGroups = {"iot.enroll.verify"},
|
|
|
|
Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE},
|
|
|
|
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY,
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
dependsOnMethods = {"verifyGraphs"})
|
|
|
|
public void temperatureGraphDataPublisherTest() {
|
|
|
|
public void temperatureGraphDataPublisherTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphValues(Constants.IOT_CONNECTED_CUP_TEMPERATURE_GRAPH_ID,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphValues(Constants.IOT_CONNECTED_CUP_TEMPERATURE_GRAPH_ID,
|
|
|
@ -135,8 +140,8 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the Y axis name of Coffee Level graph.",
|
|
|
|
@Test(description = "Test the Y axis name of Coffee Level graph.",
|
|
|
|
groups = {"iot.sample.coffee"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_COFFEELEVEL,
|
|
|
|
dependsOnGroups = {"sample.temp"})
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE)
|
|
|
|
public void coffeeLevelGraphYAxisNameTest() {
|
|
|
|
public void coffeeLevelGraphYAxisNameTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_Y_AXIS,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_Y_AXIS,
|
|
|
|
Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_ID,
|
|
|
|
Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_ID,
|
|
|
@ -144,8 +149,9 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the X axis name of Coffee Level graph.",
|
|
|
|
@Test(description = "Test the X axis name of Coffee Level graph.",
|
|
|
|
groups = {"iot.sample.coffee"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_COFFEELEVEL,
|
|
|
|
dependsOnGroups = {"iot.enroll.verify", "sample.temp"})
|
|
|
|
dependsOnGroups = {Constants.IOT_TEST_GROUP_SAMPLE_ENROLL_VERIFY,
|
|
|
|
|
|
|
|
Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE})
|
|
|
|
public void coffeeLevelGraphXAxisNameTest() {
|
|
|
|
public void coffeeLevelGraphXAxisNameTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_X_AXIS,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphAxisName(Constants.IOT_GRAPH_X_AXIS,
|
|
|
|
Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_ID,
|
|
|
|
Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_ID,
|
|
|
@ -153,23 +159,23 @@ public class SampleFunctionalityTest extends IOTIntegrationUIBaseTestCase {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph legend is present.",
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph legend is present.",
|
|
|
|
groups = {"iot.sample.coffee"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_COFFEELEVEL,
|
|
|
|
dependsOnGroups = {"sample.temp"})
|
|
|
|
dependsOnGroups = {Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE})
|
|
|
|
public void coffeeLevelGraphLegendTest() throws IOException {
|
|
|
|
public void coffeeLevelGraphLegendTest() throws IOException {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphLegendName(Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_ID,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.graphLegendName(Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_ID,
|
|
|
|
Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_LEGEND));
|
|
|
|
Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_LEGEND));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph path is visible.",
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph path is visible.",
|
|
|
|
groups = {"iot.sample.coffee"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_COFFEELEVEL,
|
|
|
|
dependsOnGroups = {"sample.temp"})
|
|
|
|
dependsOnGroups = {Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE})
|
|
|
|
public void coffeeLevelGraphPathTest() {
|
|
|
|
public void coffeeLevelGraphPathTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphPath(Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_GRAPH_ID));
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphPath(Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_GRAPH_ID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph gets values.",
|
|
|
|
@Test(description = "Test the whether the Coffee Level graph gets values.",
|
|
|
|
groups = {"iot.sample.coffee"},
|
|
|
|
groups = Constants.IOT_TEST_GROUP_SAMPLE_COFFEELEVEL,
|
|
|
|
dependsOnGroups = {"sample.temp"})
|
|
|
|
dependsOnGroups = Constants.IOT_TEST_GROUP_SAMPLE_TEMPERATURE)
|
|
|
|
public void coffeeLevelGraphDataPublisherTest() {
|
|
|
|
public void coffeeLevelGraphDataPublisherTest() {
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphValues(Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_GRAPH_ID,
|
|
|
|
Assert.assertTrue(connectedCupDeviceViewPage.checkGraphValues(Constants.IOT_CONNECTED_CUP_COFFEE_LEVEL_GRAPH_ID,
|
|
|
|
Constants.IOT_CONNECTED_CUP_LEVEl));
|
|
|
|
Constants.IOT_CONNECTED_CUP_LEVEl));
|
|
|
|