Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com..tests;
- import com..enums.Kiosk;
- import com..pages.noc.NocPage;
- import com..utils.RegressionTestRetryAnalyzer;
- import io.qameta.allure.Feature;
- import org.testng.annotations.BeforeMethod;
- import org.testng.annotations.Test;
- import java.lang.reflect.Method;
- import static com..pages.noc.view.JarsView.lock1;
- import static com..pages.noc.view.RobotView.robot;
- import static com..pages.noc.view.RobotView.robotMonitor1;
- import static com..pages.noc.view.SensorsView.*;
- import static com..pages.noc.view.VisionView.robotVision;
- import static com..pages.noc.view.VisionView.visionCheck1;
- @Deprecated
- public class DixonKioskTests extends RegressionTests {
- private NocPage nocPage;
- @BeforeMethod
- public void beforeMethod(Method method) {
- nocPage = new NocPage();
- Kiosk kiosk = Kiosk.DIXON;
- beforeMethod(kiosk);
- enableSoftAssert(method);
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk SD", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskSolidDispencers() {
- nocPage.waitPage().assertPageOpened();
- nocPage.validateAllSolidDispencersAreOn();
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk PD", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskPowderDispencers() {
- // Both the PDs are available and under devices of INGREDIENTS
- nocPage.waitPage().assertPageOpened();
- nocPage.validateAllPowderDispencersAreOn();
- // 1. PD1 has 3 ingredients
- String[] ingredients = new String[] {"Daily Vitamin + Zinc", "Ginger", "3G Energy"};
- nocPage.validatePowderDispencerIngredientsCount(1, ingredients, 3);
- // 2. PD2 has 2 ingredients
- ingredients = new String[] {"(regular/dairy)", "Soy Protein"};
- nocPage.validatePowderDispencerIngredientsCount(2, ingredients, 2);
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk LD", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskLiquidDispencers() {
- // LD1 is available and under devices of INGREDIENTS
- nocPage.waitPage().assertPageOpened();
- nocPage.validateAllLiquidDispencersAreOn();
- // 1. LD1 has 4 ingredients
- String[] ingredients = new String[] {"Oat Milk", "Mixed berry juice", "Coconut Water, Lemonade", "Passion Mango"};
- nocPage.validateLiquidDispencerIngredientsCount(1, ingredients, 4);
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk blenders are ON", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskBledners() {
- // 3 Blenders are available under devices and in ACTIVE state
- nocPage.waitPage().assertPageOpened();
- nocPage.validateAllBlendersAreOn();
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk delivery systems", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskDeliverySystem() {
- // 2 Delivery Systems (DS1 and DS2) and 2 Pour Stations (PS1 and PS2) are available under DEVICES and all 4 are ACTIVE
- nocPage.waitPage().assertPageOpened();
- nocPage.validateAllDeliverySystemsAreOn();
- nocPage.validateAllPourStationsAreOn();
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk Jars", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskJars() {
- // 8 Jars are available under DEVICES and all of them are ACTIVE
- nocPage.waitPage().assertPageOpened();
- nocPage.validateAllJarsAreOn();
- // Jar9 is off
- nocPage.validateJarWithNumberIsOff(9);
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk Vision", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskVision() {
- // Vision Check1 and Robot Vision are available under DEVICES and both are ACTIVE
- nocPage.waitPage().assertPageOpened();
- nocPage.validateVisionIsOn(robotVision);
- nocPage.validateVisionIsOn(visionCheck1);
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk Lock", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskLock() {
- // Lock1 is available under DEVICES and in ACTIVE state
- nocPage.waitPage().assertPageOpened();
- nocPage.validateLockIsOn(lock1);
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk Robot", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskRobot() {
- // Both Robot and Robot Monitor1 are available under DEVICES and both are ACTIVE
- nocPage.waitPage().assertPageOpened();
- nocPage.validateRobotIsOn(robot);
- nocPage.validateRobotIsOn(robotMonitor1);
- throwSoftAssert();
- }
- @Feature("Dixon kiosk")
- @Test(description = "Kiosk Sensor", retryAnalyzer = RegressionTestRetryAnalyzer.class)
- public void testKioskSensor() {
- // Both Robot and Robot Monitor1 are available under DEVICES and both are ACTIVE
- nocPage.waitPage().assertPageOpened();
- nocPage.validateSensorIsOn(freezer1);
- nocPage.validateSensorIsOn(freezer2);
- nocPage.validateSensorIsOn(refrigerator1);
- throwSoftAssert();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement