@Override public void createPurchaseOrderForSerializedProductFromProductInventory( String serializedProduct, String poNumber, int quantity) { search.searchForProduct( ProductSearch.builder() .productName(serializedProduct) .inActive(true) .active(true) .create()); session.click(FIRST_EDIT_PRODUCT_BTN); waits.waitUntilVisible(ProductLocators.TITLE_EDITING_PRODUCT_TYPE); session.click(PRODUCT_INVENTORY_TAB); waits.waitUntilVisible(TITLE_PRODUCT_INVENTORY); session.selectDropDownText( SELECT_VENDOR_TO_CREATE_PO_AT_PRODUCT_INVENTORY_LST, VendorData.EXISTING_VENDOR_NAME.value()); session.click(CREATE_PO_BTN); waits.waitForPageLoad(); waits.waitUntilVisible(TITLE_CREATING_NEW_PO_LABEL); session.setText(PURCHASE_ORDER_NUMBER, poNumber); session.clear(QTY_FLD); session.setText(QTY_FLD, String.valueOf(quantity)); session.click(SAVE_BTN); waits.waitUntilVisible(TITLE_PURCHASE_ORDERS_LABEL); }
@Override public void logout() { navigateTo(NavMenuLink.LOGOUT); // Added hack, overlay still causes issues when logging out // and test tries to log back in annoyingWaitHack(); waits.waitForPageLoad(); }
private void setupTest() { if (!storeSearchAction.storeExistsByName("DEPOSIT_STORE_16")) { store1 = MerchantStore.builder() .storeNumber("SN_DEP_16") .name("DEPOSIT_STORE_16".intern()) .status(StoreStatus.ACTIVE) .storeType(StoreType.STORE) .timeZoneText("IDT - Asia/Calcutta") .regionText("Mountain") .priceGroupText("Default Price Group") .salesTaxText("Salt Lake City (6.500000)") .salesTaxFloorPercentage(2.5) .pifTaxPercentage(1) .languageText("English") .operatingFund(100) .operatingFundMax(200) .safeLimit(100.00) .safeUpperLimit(200.00) .create(); storeActions.createMerchantStore(store1); employee = Employee.builder() .firstName("John") .lastName("Deposit") .userName("User16") .password("demo1234") .expirePasswordNow(false) .role(DefaultRoles.ADMINISTRATOR.getText()) .assignedStores(ImmutableList.of(store1.getName().get())) .active(true) .commissionsEnabled(true) .create(); employeeActions.addEmployeeAndLoginChangingExpiredPassword( employee, store1.getName().get(), "demo4321"); drawer1 = CashDrawer.builder() .name("Drawer_Dep_016") .merchantStoreName(store1.getName().get()) .openerString("7") .status(CashDrawer.Status.ENABLED) .operatingFund(30.0) .operatingFundUpperLimit(100.00) .create(); drawerActions.addCashDrawer(drawer1); reconcileActions.openCashDrawer(drawer1, drawer1.getOperatingFund().get(), true); waits.waitForPageLoad(); } else { commonActions.logout(); commonActions.initializeSession( employee.getUserName().get(), "demo4321", store1.getName().get()); } }
@Override public void updateCashDrawer(String nameOfCashDrawerToUpdate, CashDrawer drawer) { commonActions.navigateTo(NavMenuLink.CASH_DRAWER); commonActions.selectContentFrame(); session.click(CashDrawerLocators.getEditButton(nameOfCashDrawerToUpdate)); setFields(drawer); session.click(SAVE_BTN); waits.waitForPageLoad(); session.click(BACK_BTN); waits.waitUntilVisible(CashDrawerLocators.verifyRow(drawer)); }
@Override public void addCashDrawer(CashDrawer drawer) { commonActions.navigateTo(NavMenuLink.CASH_DRAWER); commonActions.selectContentFrame(); session.click(NEW_CASH_DRAWER_LNK); setFields(drawer); session.click(SAVE_BTN); waits.waitForPageLoad(); session.click(BACK_BTN); waits.waitUntilVisible(CashDrawerLocators.verifyRow(drawer)); }
@Override public void initializeSession(String userName, String password, String storeName) { login(userName, password, storeName); waits.waitForPageLoad(); }