Advertisement
fedorm

Untitled

Feb 9th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.84 KB | None | 0 0
  1.    * Ожидание инфоэкрана с бонусами
  2.      *
  3.      * @param cardProcessing
  4.      * @throws ScreenNotDisplayedException
  5.      * @throws TestInterruptedException
  6.      * @throws DetailsVerificationException
  7.      */
  8.     public void waitInfoScreen(String cardProcessing) throws ScreenNotDisplayedException, TestInterruptedException, DetailsVerificationException {
  9.         String cardNumber = Lang.SBERBANK_SPASIBO_CARD_NUMBER.getText() + " " + card.getCardNumber();
  10.         String cardStatus = Lang.SBERBANK_SPASIBO_CARD_STATUS.getText() + " " + card.getCardStatus();
  11.         if (cardProcessing.equals("cft")) {
  12.             String cardActiveBonuses = Lang.CFT_BONUS_INFO_BONUS_COUNT_AVAILABLE.getText() + " " + card.getAvailableCFTCountString();
  13.             String cardBonuses = Lang.CFT_BONUS_INFO_BONUS_COUNT.getText() + " " + card.getCFTCountString();
  14.  
  15.             Screen screen = CashierModeScreen.CFT_INFO.cloneScreen()
  16.                     .add(ClassType.CS_CONFIGURATOR_TEXT_FIELD_LABEL, maskCardNumber(cardNumber))
  17.                     .add(ClassType.CS_CONFIGURATOR_TEXT_FIELD_LABEL, cardStatus)
  18.                     .add(ClassType.CS_CONFIGURATOR_TEXT_FIELD_LABEL, cardActiveBonuses)
  19.                     .add(ClassType.CS_CONFIGURATOR_TEXT_FIELD_LABEL, cardBonuses);
  20.  
  21.             cb.screenTk.waitForAndVerifyScreen(screen);
  22.         } else if (cardProcessing.equals("sberbank")) {
  23.             Screen screen = CashierModeScreen.SBERBANK_SPASIBO_INFO.cloneScreen()
  24.                     .add(ClassType.CS_CONFIGURATOR_TEXT_FIELD_LABEL, cardNumber)
  25.                     .add(ClassType.CS_CONFIGURATOR_TEXT_FIELD_LABEL, cardStatus);
  26.             if (card.getPromoText() != null) {
  27.                 screen.add(ClassType.CS_CONFIGURATOR_FLOW_SETTINGS_VALUE_LABEL, card.getPromoText());
  28.             }
  29.             cb.screenTk.waitForAndVerifyScreen(screen);
  30.         }
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement