test(fusion_accounting_assets): 5 OWL tour tests
Mirrors Phase 1 + 2 tour pattern: HttpCase.start_tour wrappers tagged 'tour' so they skip cleanly when websocket-client is absent. Tours cover smoke (/odoo loads), the asset list / category list / anomaly list views, and the depreciation-run wizard form. Bundle is wired via web.assets_tests. Verified locally: 5 tests registered, all skip with "websocket-client module is not installed" (expected — no chromium in the dev container). Made-with: Cursor
This commit is contained in:
80
fusion_accounting_assets/static/src/tours/assets_tours.js
Normal file
80
fusion_accounting_assets/static/src/tours/assets_tours.js
Normal file
@@ -0,0 +1,80 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
/**
|
||||
* 5 OWL tours for fusion_accounting_assets smoke testing.
|
||||
*
|
||||
* Each tour scripts a user interaction and is invoked from Python via
|
||||
* HttpCase.start_tour(). Useful for catching UI regressions that asset-bundle
|
||||
* compilation alone won't catch.
|
||||
*/
|
||||
|
||||
// Tour 1: smoke
|
||||
registry.category("web_tour.tours").add("fusion_assets_smoke", {
|
||||
test: true,
|
||||
url: "/odoo",
|
||||
steps: () => [
|
||||
{
|
||||
content: "Wait for app",
|
||||
trigger: ".o_navbar",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// Tour 2: open asset list
|
||||
registry.category("web_tour.tours").add("fusion_assets_list", {
|
||||
test: true,
|
||||
url: "/odoo/action-fusion_accounting_assets.action_fusion_asset_list",
|
||||
steps: () => [
|
||||
{
|
||||
content: "List view loads",
|
||||
trigger: ".o_list_view, .o_view_nocontent",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// Tour 3: open categories
|
||||
registry.category("web_tour.tours").add("fusion_assets_categories", {
|
||||
test: true,
|
||||
url: "/odoo/action-fusion_accounting_assets.action_fusion_asset_category_list",
|
||||
steps: () => [
|
||||
{
|
||||
content: "Categories view loads",
|
||||
trigger: ".o_list_view, .o_view_nocontent",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// Tour 4: anomalies
|
||||
registry.category("web_tour.tours").add("fusion_assets_anomalies", {
|
||||
test: true,
|
||||
url: "/odoo/action-fusion_accounting_assets.action_fusion_asset_anomaly_list",
|
||||
steps: () => [
|
||||
{
|
||||
content: "Anomalies view loads",
|
||||
trigger: ".o_list_view, .o_view_nocontent",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// Tour 5: depreciation run wizard
|
||||
registry.category("web_tour.tours").add("fusion_assets_depreciation_wizard", {
|
||||
test: true,
|
||||
url: "/odoo/action-fusion_accounting_assets.action_fusion_depreciation_run_wizard",
|
||||
steps: () => [
|
||||
{
|
||||
content: "Wizard form opens",
|
||||
trigger: ".modal-dialog .o_form_view",
|
||||
},
|
||||
{
|
||||
content: "Period date field exists",
|
||||
trigger: ".modal-dialog [name='period_date']",
|
||||
},
|
||||
{
|
||||
content: "Close wizard",
|
||||
trigger: ".modal-dialog .btn-secondary",
|
||||
run: "click",
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user