Video is here.
Code is here:
File: myscript1.js
function repeatTest($scope) {
$scope.tests = [
{testName: "Test1", overallResult: "Pass", firstError: "-", lastError: "-"},
{testName: "Test2", overallResult: "Fail", firstError: "Page not found", lastError: "Page not found"},
{testName: "Test3", overallResult: "Fail", firstError: "Could not select value in combobox - EmpAgeRange", lastError: "Could not find editbox - EmpAddressLine2"}
];
}
File: index.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="myscript1.js"></script>
</head>
<body ng-app="">
<h1>Test Run Summary</h1>
<div ng-controller="repeatTest">
<table>
<thead style="background-color: lightgray;">
<tr>
<td style="width: 30px;"></td>
<td>Test Name</td>
<td>Overall Result</td>
<td>Point of Failure</td>
</tr>
</thead>
<tbody>
<tr ng-repeat-start="test in tests">
<td>
<button ng-if="test.expanded" ng-click="test.expanded = false">-</button>
<button ng-if="!test.expanded" ng-click="test.expanded = true">+</button>
</td>
<td>{{test.testName}}</td>
<td>{{test.overallResult}}</td>
</tr>
<tr ng-if="test.expanded">
<td />
<td />
<td />
<td colspan="1">First Error: <br>{{test.firstError}}</td>
</tr>
<tr ng-if="test.expanded" ng-repeat-end="">
<td />
<td />
<td />
<td colspan="1">Last Error: <br>{{test.lastError}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
Code is here:
File: myscript1.js
function repeatTest($scope) {
$scope.tests = [
{testName: "Test1", overallResult: "Pass", firstError: "-", lastError: "-"},
{testName: "Test2", overallResult: "Fail", firstError: "Page not found", lastError: "Page not found"},
{testName: "Test3", overallResult: "Fail", firstError: "Could not select value in combobox - EmpAgeRange", lastError: "Could not find editbox - EmpAddressLine2"}
];
}
File: index.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="myscript1.js"></script>
</head>
<body ng-app="">
<h1>Test Run Summary</h1>
<div ng-controller="repeatTest">
<table>
<thead style="background-color: lightgray;">
<tr>
<td style="width: 30px;"></td>
<td>Test Name</td>
<td>Overall Result</td>
<td>Point of Failure</td>
</tr>
</thead>
<tbody>
<tr ng-repeat-start="test in tests">
<td>
<button ng-if="test.expanded" ng-click="test.expanded = false">-</button>
<button ng-if="!test.expanded" ng-click="test.expanded = true">+</button>
</td>
<td>{{test.testName}}</td>
<td>{{test.overallResult}}</td>
</tr>
<tr ng-if="test.expanded">
<td />
<td />
<td />
<td colspan="1">First Error: <br>{{test.firstError}}</td>
</tr>
<tr ng-if="test.expanded" ng-repeat-end="">
<td />
<td />
<td />
<td colspan="1">Last Error: <br>{{test.lastError}}</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
Comments
Post a Comment