<commit_before>/*
 * Copyright 2001-2012 <NAME>
 *
 * 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 woko.webtests.bootstrap3

import junit.framework.Assert
import org.openqa.selenium.By
import com.pojosontheweb.selenium.Findr
import com.pojosontheweb.selenium.ManagedDriverTestBase

abstract class WebTestBase extends ManagedDriverTestBase {

    def port = System.getProperty("woko.webtests.port", "9999")
    def homeUrl = "http://localhost:$port/woko-webtests"
    def useContainerAuth = true

    void goToPage(String url) {
        webDriver.get(homeUrl + url)
        def src = webDriver.pageSource
        if (src.contains("Page not found") || src.contains("An error occured")) {
            throw new RuntimeException("Url $url responded 404 or 500")
        }
    }<commit_msg>propagate selenium-utils refactor<commit_after>/*
 * Copyright 2001-2012 <NAME>
 *
 * 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 woko.webtests.bootstrap3

import com.pojosontheweb.selenium.ManagedDriverJunit4TestBase
import org.junit.Assert
import org.openqa.selenium.By
import com.pojosontheweb.selenium.Findr

abstract class WebTestBase extends ManagedDriverJunit4TestBase {

    def port = System.getProperty("woko.webtests.port", "9999")
    def homeUrl = "http://localhost:$port/woko-webtests"
    def useContainerAuth = true

    void goToPage(String url) {
        webDriver.get(homeUrl + url)
        def src = webDriver.pageSource
        if (src.contains("Page not found") || src.contains("An error occured")) {
            throw new RuntimeException("Url $url responded 404 or 500")
        }
    }
{'fraction_non_alphanumeric': 0.08674242424242425, 'fraction_numerical': 0.01818181818181818, 'mean_word_length': 3.6496478873239435, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3441096', 'n_tokens_mistral': 765, 'n_tokens_neox': 716, 'n_words': 262}