package org.apache.tapestry5.integration.app1

import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.testng.annotations.Test

class TapestryJavaScriptTests extends TapestryCoreTestCase {

    @Test
    void basic_javascript_tests() {
        openLinks "JavaScript Unit Tests"

        def caption = getText("//div[@class='js-results']/p[@class='caption']")

        def matches = caption =~ /(\d+) failed/

        if (matches[0][1] != "0"){
            fail "Some JavaScript unit tests failed"
        }
    }
}
package org.apache.tapestry5.integration.app1

import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.testng.annotations.Test

class TapestryJavaScriptTests extends TapestryCoreTestCase {

    @Test
    void basic_javascript_tests() {
        openLinks "JavaScript Unit Tests"

        def caption = getText("//div[@class='js-results']/p[contains(@class,'caption')]")

        def matches = caption =~ /(\d+) failed/

        if (matches[0][1] != "0"){
            fail "Some JavaScript unit tests failed"
        }
    }
}
Fix error in JavaScript unit tests
TAP5-999: Fix error in JavaScript unit tests

git-svn-id: d9b8539636d91aff9cd33ed5cd52a0cf73394897@1141178 13f79535-47bb-0310-9956-ffa450edef68
