<div class="flex flex-grow-1 border p-2 col-sm m-2">
    <div class="d-flex flex-column">
        <div class="graph-title d-inline-flex border-bottom" data-bs-toggle="collapse" data-bs-target="#features-charts, #scenarios-charts,#metadata-properties">
            <h2 class="d-flex align-text-bottom"> Features </h2>
            <li class="d-flex align-items-center ms-auto">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
            </li>
        </div>
        <div id="features-charts" class="collapse show">
            <div class="x_content container-fluid">
                <table class="w-100 d-flex flex-column">
                    <tr class="d-flex flex-row justify-content-center">
                        <td class="me-3">
                            <div class="chart-container">
                                <canvas id="features"></canvas>
                            </div>
                        </td>
                        <td class="align-top">
                            <table class="w-100">
                                <tr>
                                    <th class="pe-2">
                                        <div>
                                            <p class="text-center">Status</p>
                                        </div>   
                                    </th> 
                                    <th class="me-2">                                              
                                        <div>
                                            <p class="text-center">Progress</p>
                                        </div>
                                    </th>
                                </tr>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario passed">
                                            <i class="fa fa-check-circle passed-color me-2"></i>
                                            Passed
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.passedPercentage %> %</td>
                                </tr>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario failed">
                                            <i class="fa fa-exclamation-circle failed-color me-2"></i>
                                            Failed
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.failedPercentage %> %</td>
                                <% if (suite.results.features.ambiguous) { %>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left"
                                        title="Scenario has double step implementation and failed because of that.">
                                            <i class="fa fa-bolt ambiguous-color me-2 ms-1"></i>
                                            Ambiguous
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.ambiguousPercentage %> %</td>
                                </tr>
                                <% } %>
                                <% if (suite.results.features.undefined) { %>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario has no step implmentation.">
                                            <i class="fa fa-question-circle undefined-color me-2"></i>
                                            Not defined
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.undefinedPercentage %> %</td>
                                </tr>
                                <% } %>
                                </tr>
                                <% if (suite.results.features.pending) { %>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario is pending">
                                            <i class="fa fa-minus-circle pending-color me-2"></i>
                                            Pending
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.pendingPercentage %> %</td>
                                </tr>
                                <% } %>
                                <% if (suite.results.features.skipped) { %>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario is skipped">
                                            <i class="fa fa-arrow-circle-right skipped-color me-2"></i>
                                            Skipped
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.skippedPercentage %> %</td>
                                </tr>
                                <% } %>
                                <% if (suite.results.features.various) { %>
                                <tr>
                                    <td class="pe-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenarios have multiple results">
                                            <i class=" fas fa-blender various-color me-2"></i>
                                            Various
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.features.variousPercentage %> %</td>
                                </tr>
                                <% } %>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>

<div class="flex flex-grow-1 border p-2 col-sm m-2">
    <div class="d-flex flex-column">
        <div class="graph-title d-inline-flex border-bottom" data-bs-toggle="collapse" data-bs-target="#features-charts, #scenarios-charts,#metadata-properties">
            <h2 class="d-flex align-text-bottom"> Scenarios </h2>
            <li class="d-flex align-items-center ms-auto">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
            </li>
        </div>
        <div id="scenarios-charts" class="collapse show">
            <div class="x_content container-fluid">
                <table class="w-100 d-flex flex-column">
                    <tr class="d-flex flex-row justify-content-center">
                        <td class="me-3">
                            <div class="chart-container">
                                <canvas id="scenarios"></canvas>
                            </div>
                        </td>
                        <td class="align-top">
                            <table class="w-100">
                                <tr>
                                    <th class="me-2">
                                        <div>
                                            <p class="text-center">Status</p>
                                        </div>   
                                    </th> 
                                    <th class="me-2">                                              
                                        <div>
                                            <p class="text-center">Progress</p>
                                        </div>
                                    </th>
                                </tr>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario passed">
                                            <i class="fa fa-check-circle passed-color me-2"></i>
                                            Passed
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.passedPercentage %> %</td>
                                </tr>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario failed">
                                            <i class="fa fa-exclamation-circle failed-color me-2"></i>
                                            Failed
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.failedPercentage %> %</td>
                                <% if (suite.results.scenarios.ambiguous) { %>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left"
                                        title="Scenario has double step implementation and failed because of that.">
                                            <i class="fa fa-bolt ambiguous-color me-2 ms-1"></i>
                                            Ambiguous
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.ambiguousPercentage %> %</td>
                                </tr>
                                <% } %>
                                <% if (suite.results.scenarios.undefined) { %>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario has no step implmentation.">
                                            <i class="fa fa-question-circle undefined-color me-2"></i>
                                            Not defined
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.undefinedPercentage %> %</td>
                                </tr>
                                <% } %>
                                </tr>
                                <% if (suite.results.scenarios.pending) { %>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario is pending">
                                            <i class="fa fa-minus-circle pending-color me-2"></i>
                                            Pending
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.pendingPercentage %> %</td>
                                </tr>
                                <% } %>
                                <% if (suite.results.scenarios.skipped) { %>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenario is skipped">
                                            <i class="fa fa-arrow-circle-right skipped-color me-2"></i>
                                            Skipped
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.skippedPercentage %> %</td>
                                </tr>
                                <% } %>
                                <% if (suite.results.scenarios.various) { %>
                                <tr>
                                    <td class="me-2">
                                        <p class="mb-0" data-toggle="tooltip" data-placement="left" title="Scenarios have multiple results">
                                            <i class=" fas fa-blender various-color me-2"></i>
                                            Various
                                        </p>
                                    </td>
                                    <td class="text-end"><%= suite.results.scenarios.variousPercentage %> %</td>
                                </tr>
                                <% } %>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>

<%if(Object.entries(suite.metadata).length > 0){%>
    <div class="flex flex-grow-1 border p-2 col-sm m-2">
        <div class="d-flex flex-column">
            <div class="graph-title d-inline-flex border-bottom mb-3" data-bs-toggle="collapse" data-bs-target="#features-charts, #scenarios-charts, #metadata-properties">
                <h2 class="d-flex align-text-bottom" test-id="additional-data.title"> <%=suite.metadataTitle%></h2>
                <li class="d-flex align-items-center ms-auto">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                </li>
            </div>
            <div id="metadata-properties" class="collapse show">
                <div class="d-flex flex-column">
                    <div class="d-flex flex-column">
                        <table class="d-flex flex-column w-100 table-scrollable" test-id="additional-data.table" >
                            <tbody  class="d-flex flex-column">
                                <% suite.metadata.forEach( metadata =>{  %>                                       
                                <tr class="d-flex mb-2">
                                    <td class="d-flex flex-grow-1 border-bottom fw-bold text-break w-25">
                                        <%= metadata.name %>
                                    </td>
                                    <td class="d-flex flex-grow-1 border-bottom me-2 text-break w-50">
                                        <%= metadata.value %>
                                    </td>
                                </tr>                                            
                                <%});%>
                            </tbody>
                        </table>                                        
                    </div>
                </div>
            </div>
        </div>
     </div>   
    <%}%>