<commit_before>import { by, ElementFinder, ProtractorBrowser } from 'protractor'
import { waitForElementToBeClickable, waitForElementToBeVisible } from '../utils/browser.utils'

export class TileComponent {
  tradeType: Record<string, Record<string, ElementFinder>>

  constructor(private browser: ProtractorBrowser, public root: ElementFinder) {
    this.tradeType = {
      EURToUSD: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-eurusd')),
        buy: root.element(by.qaTag('direction-buy-eurusd')),
        notional: root.element(by.qaTag('notional-input__input-eurusd'))
      },
      USDToJPY: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-usdjpy')),
        buy: root.element(by.qaTag('direction-buy-usdjpy')),
        notional: root.element(by.qaTag('notional-input__input-usdjpy'))
      },
      GBPToUSD: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-gbpusd')),
        buy: root.element(by.qaTag('direction-buy-gbpusd')),
        notional: root.element(by.qaTag('notional-input__input-gbpusd'))
      },
      GBPToJPY: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-gbpjpy')),
        buy: root.element(by.qaTag('direction-buy-gbpjpy')),
        notional: root.element(by.qaTag('notional-input__input-gbpjpy'))
      },
      AUDToUSD: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-audusd')),
        buy: root.element(by.qaTag('direction-buy-audusd')),
        notional: root.element(by.qaTag('notional-input__input-audusd'))
      },
      NZDToUSD: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-nzdusd')),
        buy: root.element(by.qaTag('direction-buy-nzdusd')),
        notional: root.element(by.qaTag('notional-input__input-nzdusd'))
      },
      EURToAUD: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-euraud')),
        buy: root.element(by.qaTag('direction-buy-euraud')),
        notional: root.element(by.qaTag('notional-input__input-euraud'))
      },
      EURToCAD: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-eurcad')),
        buy: root.element(by.qaTag('direction-buy-eurcad')),
        notional: root.element(by.qaTag('notional-input__input-eurcad'))
      },
      EURToJPY: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        sell: root.element(by.qaTag('direction-sell-eurjpy')),
        buy: root.element(by.qaTag('direction-buy-eurjpy')),
        notional: root.element(by.qaTag('notional-input__input-eurjpy'))
      },
      confirmationScreen: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        labelTradeId: root.element(by.qa('tile-notification__tradeid')),
        labelMessage: root.element(by.qa('tile-notification__content')),
        pillButton: root.element(by.qa('tile-notification__pill-button'))
      }
    }
  }

  async selectSpotTile(currencyTrade: string, type: string) {
    const buttonElement = this.tradeType[currencyTrade][type]
    if (!buttonElement) {
      throw new Error(`could not find element with symbol ${currencyTrade}${type}`)
    }
    await waitForElementToBeClickable(this.browser, buttonElement)
    await buttonElement.click()
  }
<commit_msg>Removing redundant lines<commit_after>import { by, ElementFinder, ProtractorBrowser } from 'protractor'
import { waitForElementToBeClickable, waitForElementToBeVisible } from '../utils/browser.utils'

export class TileComponent {
  tradeType: Record<string, Record<string, ElementFinder>>

  constructor(private browser: ProtractorBrowser, public root: ElementFinder) {
    this.tradeType = {
      EURToUSD: {
        sell: root.element(by.qaTag('direction-sell-eurusd')),
        buy: root.element(by.qaTag('direction-buy-eurusd')),
        notional: root.element(by.qaTag('notional-input__input-eurusd'))
      },
      USDToJPY: {
        sell: root.element(by.qaTag('direction-sell-usdjpy')),
        buy: root.element(by.qaTag('direction-buy-usdjpy')),
        notional: root.element(by.qaTag('notional-input__input-usdjpy'))
      },
      GBPToUSD: {
        sell: root.element(by.qaTag('direction-sell-gbpusd')),
        buy: root.element(by.qaTag('direction-buy-gbpusd')),
        notional: root.element(by.qaTag('notional-input__input-gbpusd'))
      },
      GBPToJPY: {
        sell: root.element(by.qaTag('direction-sell-gbpjpy')),
        buy: root.element(by.qaTag('direction-buy-gbpjpy')),
        notional: root.element(by.qaTag('notional-input__input-gbpjpy'))
      },
      AUDToUSD: {
        sell: root.element(by.qaTag('direction-sell-audusd')),
        buy: root.element(by.qaTag('direction-buy-audusd')),
        notional: root.element(by.qaTag('notional-input__input-audusd'))
      },
      NZDToUSD: {
        sell: root.element(by.qaTag('direction-sell-nzdusd')),
        buy: root.element(by.qaTag('direction-buy-nzdusd')),
        notional: root.element(by.qaTag('notional-input__input-nzdusd'))
      },
      EURToAUD: {
        sell: root.element(by.qaTag('direction-sell-euraud')),
        buy: root.element(by.qaTag('direction-buy-euraud')),
        notional: root.element(by.qaTag('notional-input__input-euraud'))
      },
      EURToCAD: {
        sell: root.element(by.qaTag('direction-sell-eurcad')),
        buy: root.element(by.qaTag('direction-buy-eurcad')),
        notional: root.element(by.qaTag('notional-input__input-eurcad'))
      },
      EURToJPY: {
        sell: root.element(by.qaTag('direction-sell-eurjpy')),
        buy: root.element(by.qaTag('direction-buy-eurjpy')),
        notional: root.element(by.qaTag('notional-input__input-eurjpy'))
      },
      confirmationScreen: {
        labelCurrency: root.element(by.qa('tile-notification__symbols')),
        labelTradeId: root.element(by.qa('tile-notification__tradeid')),
        labelMessage: root.element(by.qa('tile-notification__content')),
        pillButton: root.element(by.qa('tile-notification__pill-button'))
      }
    }
  }

  async selectSpotTile(currencyTrade: string, type: string) {
    const buttonElement = this.tradeType[currencyTrade][type]
    if (!buttonElement) {
      throw new Error(`could not find element with symbol ${currencyTrade}${type}`)
    }
    await waitForElementToBeClickable(this.browser, buttonElement)
    await buttonElement.click()
  }

{'fraction_non_alphanumeric': 0.15217073527262096, 'fraction_numerical': 0.0, 'mean_word_length': 3.495400788436268, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5929239', 'n_tokens_mistral': 2327, 'n_tokens_neox': 2263, 'n_words': 262}