- Updated architecture documentation to include details on UI rendering checks and Playwright end-to-end tests. - Revised testing documentation to specify Playwright for frontend E2E tests and added details on running tests. - Implemented feedback mechanism in scenario form for successful creation notifications. - Added feedback div in ScenarioForm.html for user notifications. - Created new fixtures for Playwright tests to manage server and browser instances. - Developed comprehensive E2E tests for consumption, costs, equipment, maintenance, production, and scenarios. - Added smoke tests to verify UI page loading and form submissions. - Enhanced unit tests for simulation and validation, including new tests for report generation and validation errors. - Created new test files for router validation to ensure consistent error handling. - Established a new test suite for UI routes to validate dashboard and reporting functionalities. - Implemented validation tests to ensure proper handling of JSON payloads.
54 lines
1.6 KiB
HTML
54 lines
1.6 KiB
HTML
{% extends "base.html" %} {% block title %}Scenario Management · CalMiner{%
|
|
endblock %} {% block content %}
|
|
<section class="panel">
|
|
<h2>Create a New Scenario</h2>
|
|
<form id="scenario-form" class="form-grid">
|
|
<label>
|
|
<span>Name</span>
|
|
<input type="text" name="name" id="name" required />
|
|
</label>
|
|
<label>
|
|
<span>Description</span>
|
|
<input type="text" name="description" id="description" />
|
|
</label>
|
|
<button type="submit" class="btn primary">Create Scenario</button>
|
|
</form>
|
|
<div id="feedback" class="feedback hidden" aria-live="polite"></div>
|
|
<div class="table-container">
|
|
{% if scenarios %}
|
|
<table id="scenario-table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="scenario-table-body">
|
|
{% for scenario in scenarios %}
|
|
<tr data-scenario-id="{{ scenario.id }}">
|
|
<td>{{ scenario.name }}</td>
|
|
<td>{{ scenario.description or "—" }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p id="empty-state" class="empty-state">
|
|
No scenarios yet. Create one to get started.
|
|
</p>
|
|
<table id="scenario-table" class="hidden" aria-hidden="true">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="scenario-table-body"></tbody>
|
|
</table>
|
|
{% endif %}
|
|
</div>
|
|
</section>
|
|
{% endblock %} {% block scripts %} {{ super() }}
|
|
<script src="/static/js/scenario-form.js"></script>
|
|
{% endblock %}
|