<commit_before>/*
 * Copyright 2018 HM Revenue & Customs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package hts.pages

import hts.browser.Browser
import junit.framework.Assert
import org.openqa.selenium.{By, WebDriver}

trait Page {

  val expectedURL: String

  val expectedPageTitle: Option[String] = None

  val expectedPageHeader: Option[String] = None

  def navigate()(implicit driver: WebDriver): Unit = Browser.go to expectedURL

  def checkForOldQuotes()(implicit driver: WebDriver): Unit = {
    val bodyText: String = driver.findElement(By.tagName("body")).getText()
    Assert.assertFalse("No old single quotes were found!", bodyText.contains("'"))
    Assert.assertFalse("No old double quotes were found!", bodyText.contains('"'))
  }

}

<commit_msg>HTS-1183 Corrected old quotes found error message in selenium tests (#612)<commit_after>/*
 * Copyright 2018 HM Revenue & Customs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package hts.pages

import hts.browser.Browser
import junit.framework.Assert
import org.openqa.selenium.{By, WebDriver}

trait Page {

  val expectedURL: String

  val expectedPageTitle: Option[String] = None

  val expectedPageHeader: Option[String] = None

  def navigate()(implicit driver: WebDriver): Unit = Browser.go to expectedURL

  def checkForOldQuotes()(implicit driver: WebDriver): Unit = {
    val bodyText: String = driver.findElement(By.tagName("body")).getText()
    Assert.assertFalse("Old single quotes were found!", bodyText.contains("'"))
    Assert.assertFalse("Old double quotes were found!", bodyText.contains('"'))
  }

}


{'fraction_non_alphanumeric': 0.09531071292413268, 'fraction_numerical': 0.008768585589020206, 'mean_word_length': 4.290322580645161, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2649207', 'n_tokens_mistral': 742, 'n_tokens_neox': 703, 'n_words': 282}