1
votes

Having installed the Chutzpah extension into Visual Studio 2015 and created a simple JavaScript function with accompanying unit test which VS2015 Chutzpah detects and runs successfully, I was wondering what I need to do in order to setup something around using HTML.

I've been on the Chutzpah website and looked at the samples, but I cannot see anything obvious on what is required.

Is it possible to setup something around the following noddy scenario.

I have a html page to test against:

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Test Page</title>

    <script src="../../Scripts/jquery-3.1.0.js"></script>
    <script src="mypage.js"></script>

</head>
<body>

    <span id="myspan">Hello there</span>
    <br />
    <button onclick="myPage.myButtonClick(); return false;">Change Span Text</button>

</body>


</html>

I have some javascript file that runs some jQuery when the button is clicked:

var myPage = myPage || {};

myPage.myButtonClick = function buttonClick() {
    $("#myspan").text("Has been changed");
}

What do I need to do to put a test together in order to run under Visual Studio that can determine that the HTML was set?

1
Hey, did you find a solution?dyesdyes
Not as yet. I've parked this up for now unfortunately.Andez

1 Answers

0
votes

You can try to use custom HTML, by setting up chutzpah.json file with parameter:

  {
    CustomTestHarnessPath": "index.html
  }

Here is some documentation on it: link