repl.it
HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • jquery.js
  • json.js
  • style.css
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" type="image/png" href="http://airtest.netease.com/static/img/icon/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" href="style.css">

    <title>Report</title>
</head>


<body class="en">
    <div class="container-fluid">
        <div class="container">
            <div class="main">
                <div class="material">
                    <h1>Projeto Virgo</h1>
                    <div class="center">
                        <div class="time pt">Versão 1.0.0 <b>Data</b> 29/05/2019</div>
                    </div>
                    <div class="container-fluid">
                        <div class="container">
                            <div class="table">
                                <div class="table-title">
                                    <span class="running_detail en">Report</span>
                                </div>

                                <div class="table-content">
                                    <div class="table-row table-head">
                                        <div class="table-col short en">Device</div>
                                        <div class="table-col long en">Test Case</div>
                                        <div class="table-col">Status</div>
                                    </div>
                                    <div class="table-col short name">Galaxy S9</div>
                                    <div class="table-col long en ">Tela_Iniciar.air</div>
                                    <div class="table-col short en ">Pass</div>
                                    <div class="table-col detail en">click to see detail</div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript" src="./jquery.js"></script>
<script src="./json.js"></script>

<script>
    (jsonReport.report).forEach(element => {
        var name = '<div class="table-col short name">' + element.device_id + '</div>'
        
        console.log(element.results);
        (element.results).map(e => {
            $(".table-content").append(name)
            $(".table-content").append('<div class="table-col long en ">' + e.suite_name + '</div>')
            $(".table-content").append('<div class="table-col short en ">' + e.suite_result + '</div>')
            $(".table-content").append('<div class="table-col detail en">click to see detail</div>')

            console.log(e.results);
            (e.suite_results).map(elem_suite_results => {
                $(".table-content").append(name)
                $(".table-content").append('<div class="table-col long en ">' + elem_suite_results.test_name + '</div>')
                $(".table-content").append('<div class="table-col short en ">' + elem_suite_results.test_result + '</div>')
                $(".table-content").append('<div class="table-col detail en">click to see detail</div>')
            })
        })
    });

</script>
</html>
result
console
?