account
This commit is contained in:
179
account_reports/static/tests/tours/account_reports.js
Normal file
179
account_reports/static/tests/tours/account_reports.js
Normal file
@@ -0,0 +1,179 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
function textLineIs(n, text) {
|
||||
return {
|
||||
trigger: `tr:nth-child(${n}) td:nth-child(2):text(${text})`,
|
||||
};
|
||||
}
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_tour", {
|
||||
steps: () => [
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
// Foldable
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
content: "Initial foldable",
|
||||
trigger: "table",
|
||||
},
|
||||
{
|
||||
trigger: `tbody > tr[data-id=line]:not(.o_hidden):not(.empty):count(26)`,
|
||||
},
|
||||
{
|
||||
content:
|
||||
"Since the total line is not displayed (folded), the amount should be on the line",
|
||||
trigger: `tr:nth-child(5) td:nth-child(2):text(75.00)`,
|
||||
|
||||
},
|
||||
{
|
||||
content: "Click to unfold line",
|
||||
trigger: "tr:nth-child(5) td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Line is unfolded",
|
||||
trigger: "tr:nth-child(6) td:nth-child(1):contains('101401')",
|
||||
},
|
||||
{
|
||||
trigger: `tbody > tr[data-id=line]:not(.o_hidden):not(.empty):count(28)`,
|
||||
},
|
||||
{
|
||||
content:
|
||||
"Since the total line is displayed (unfolded), the amount should not be on the line",
|
||||
trigger: `tr:nth-child(5) td:nth-child(2):text()`,
|
||||
},
|
||||
{
|
||||
content: "Click to fold line",
|
||||
trigger: "tr:nth-child(5) td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Line is folded",
|
||||
trigger: "tr:nth-child(5) td:nth-child(2):text(75.00)",
|
||||
},
|
||||
{
|
||||
trigger: "tbody > tr[data-id=line]:not(.o_hidden):not(.empty):count(26)",
|
||||
},
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
// Sortable
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
content: "Unfold first line",
|
||||
trigger: "tr:nth-child(5) td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Unfold second line",
|
||||
trigger: "tr:nth-child(8) td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Unfold third line",
|
||||
trigger: "tr:nth-child(11) td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Extra Trigger step",
|
||||
trigger: "tr:nth-child(13):not(.d-none) td:nth-child(1):contains('101404')",
|
||||
},
|
||||
{
|
||||
content: "Initial sortable",
|
||||
trigger: "tr:nth-child(12) td:nth-child(2):text(100.00)",
|
||||
},
|
||||
textLineIs(6, "75.00"),
|
||||
textLineIs(7, "75.00"),
|
||||
textLineIs(9, "25.00"),
|
||||
textLineIs(10, "25.00"),
|
||||
textLineIs(12, "100.00"),
|
||||
textLineIs(13, "50.00"),
|
||||
textLineIs(14, "150.00"),
|
||||
{
|
||||
content: "Click sort",
|
||||
trigger: "th .btn_sortable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: "tr:nth-child(12) td:nth-child(2):contains('50.00')",
|
||||
},
|
||||
{
|
||||
content: "Unfold not previously unfolded line",
|
||||
trigger: "tr:nth-child(23):contains('Current Liabilities') td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Line is unfolded",
|
||||
trigger: "tr:nth-child(24) td:nth-child(1):contains('251000')",
|
||||
run: "click",
|
||||
},
|
||||
textLineIs(6, "75.00"),
|
||||
textLineIs(7, "75.00"),
|
||||
textLineIs(9, "25.00"),
|
||||
textLineIs(10, "25.00"),
|
||||
textLineIs(12, "50.00"),
|
||||
textLineIs(13, "100.00"),
|
||||
textLineIs(14, "150.00"),
|
||||
{
|
||||
content: "Click sort",
|
||||
trigger: "th .btn_sortable",
|
||||
run: "click",
|
||||
},
|
||||
textLineIs(6, "75.00"),
|
||||
textLineIs(7, "75.00"),
|
||||
textLineIs(9, "25.00"),
|
||||
textLineIs(10, "25.00"),
|
||||
textLineIs(12, "100.00"),
|
||||
textLineIs(13, "50.00"),
|
||||
textLineIs(14, "150.00"),
|
||||
{
|
||||
content: "Click sort",
|
||||
trigger: "th .btn_sortable",
|
||||
run: "click",
|
||||
},
|
||||
textLineIs(6, "75.00"),
|
||||
textLineIs(7, "75.00"),
|
||||
textLineIs(9, "25.00"),
|
||||
textLineIs(10, "25.00"),
|
||||
textLineIs(12, "100.00"),
|
||||
textLineIs(13, "50.00"),
|
||||
textLineIs(14, "150.00"),
|
||||
],
|
||||
});
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_general_ledger_cumulated_balance", {
|
||||
steps: () => [
|
||||
{
|
||||
content: "Open the journal Items of the Bank account",
|
||||
trigger: "tr:has(td:nth-child(1):contains('4000')) .btn_action:contains('Journal Items'):not(:visible)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open the optional columns dropdown",
|
||||
trigger: "div.o_optional_columns button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check the cumulated balance column",
|
||||
trigger: ".o_popover span:has(input[name='cumulated_balance'])",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the column to be visible",
|
||||
trigger: "th[data-name='cumulated_balance']:visible",
|
||||
},
|
||||
{
|
||||
content: "Check that the cumulated balance is correct on the move lines",
|
||||
trigger: ".o_list_table",
|
||||
run: async () => {
|
||||
const amounts = document.querySelectorAll("td[name='cumulated_balance']");
|
||||
const expectedAmounts = ["$ 30,000.00", "$ 29,000.00", "$ 27,500.00", "$ 25,500.00", "$ 23,000.00"];
|
||||
for (let i = 0; i < amounts.length; i++) {
|
||||
if (amounts[i].textContent !== expectedAmounts[i]) {
|
||||
throw new Error(`Expected cumulated balance to be ${expectedAmounts[i]}, but got ${amounts[i].textContent}`);
|
||||
}
|
||||
}
|
||||
if (amounts.length !== expectedAmounts.length) {
|
||||
throw new Error(`Expected ${expectedAmounts.length} cumulated balance cells, but got ${amounts.length}`);
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,91 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add('account_reports_rounding_unit', {
|
||||
steps: () => [
|
||||
{
|
||||
content: 'Test the value of `Receivables` line in decimals',
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:contains("1,150,000.00")',
|
||||
run: "click",
|
||||
},
|
||||
// Units
|
||||
{
|
||||
content: "Open amounts rounding dropdown",
|
||||
trigger: "#filter_rounding_unit button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the units filter",
|
||||
trigger: ".dropdown-item:contains('In $')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
trigger:
|
||||
'.line_name:contains("Receivables") + .line_cell:not(:contains("1,150,000.00"))',
|
||||
},
|
||||
{
|
||||
content: 'test the value of `Receivables` line in units',
|
||||
// We wait for the value to change.
|
||||
// We check the new value.
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:contains("1,150,000")',
|
||||
run: "click",
|
||||
},
|
||||
// Thousands
|
||||
{
|
||||
content: "Open amounts rounding dropdown",
|
||||
trigger: "#filter_rounding_unit button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the thousands filter",
|
||||
trigger: ".dropdown-item:contains('In K$')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:not(:contains("1,150,000"))',
|
||||
},
|
||||
{
|
||||
content: 'test the value of `Receivables` line in thousands',
|
||||
// We wait for the value to change.
|
||||
// We check the new value.
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:contains("1,150")',
|
||||
run: "click",
|
||||
},
|
||||
// Millions
|
||||
{
|
||||
content: "Open amounts rounding dropdown",
|
||||
trigger: "#filter_rounding_unit button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the millions filter",
|
||||
trigger: ".dropdown-item:contains('In M$')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:not(:contains("1,150"))',
|
||||
},
|
||||
{
|
||||
content: 'test the value of `Receivables` line in millions',
|
||||
// We wait for the value to change.
|
||||
// We check the new value.
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:contains("1")',
|
||||
run: "click",
|
||||
},
|
||||
// Decimals
|
||||
{
|
||||
content: "Open amounts rounding dropdown",
|
||||
trigger: "#filter_rounding_unit button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the decimals filter",
|
||||
trigger: ".dropdown-item:contains('In .$')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: 'test the value of `Receivables` line in millions',
|
||||
trigger: '.line_name:contains("Receivables") + .line_cell:contains("1,150,000.00")',
|
||||
run: () => null,
|
||||
},
|
||||
]
|
||||
});
|
||||
@@ -0,0 +1,169 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_annotations", {
|
||||
steps: () => [
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
// Annotations
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
// Test the initial status of annotations - There are 2 annotations to display
|
||||
{
|
||||
content: "Initial annotations",
|
||||
trigger: "body:has(.o_content):not(:has(.annotations)",
|
||||
},
|
||||
{
|
||||
content: "Unfold first line",
|
||||
trigger: "tr:nth-child(5) td:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the line to load",
|
||||
trigger: "tr:nth-child(6).line_level_6"
|
||||
},
|
||||
{
|
||||
content: "Unfold second line",
|
||||
trigger: "tr:nth-child(8) td:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the line to load",
|
||||
trigger: "tr:nth-child(9).line_level_6"
|
||||
},
|
||||
{
|
||||
content: "Unfold third line",
|
||||
trigger: "tr:nth-child(11) td:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the line to load",
|
||||
trigger: "tr:nth-child(12).line_level_6"
|
||||
},
|
||||
{
|
||||
content: "Extra Trigger step",
|
||||
trigger: "tr:nth-child(6) .o_account_report_chatter_annotated",
|
||||
},
|
||||
{
|
||||
content: "Extra Trigger step",
|
||||
trigger: "tr:nth-child(13) .o_account_report_chatter_annotated",
|
||||
},
|
||||
{
|
||||
content: "Check there are two lines annotated initially",
|
||||
trigger: ".o_content:has(.btn_annotation.o_account_report_chatter_annotated:count(2))",
|
||||
},
|
||||
// Test that we can add a new annotation
|
||||
{
|
||||
content: "Click to show caret option",
|
||||
trigger: "tr:nth-child(9) .btn_annotation:not(:visible)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Add a log note",
|
||||
trigger: ".o-mail-Chatter-logNote",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Add text to annotate",
|
||||
trigger: ".o-mail-Composer-inputContainer textarea",
|
||||
run: "edit Annotation 121000",
|
||||
},
|
||||
{
|
||||
content: "Submit by logging the note",
|
||||
trigger: ".o-mail-Composer-send",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Close Chatter",
|
||||
trigger: ".o_control_panel .btn-secondary[data-tooltip='Chatter']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for annotation created",
|
||||
trigger: "tr:nth-child(9) .o_account_report_chatter_annotated",
|
||||
},
|
||||
{
|
||||
content: "Check there are now three lines annotated",
|
||||
trigger: ".o_content:has(.btn_annotation.o_account_report_chatter_annotated:count(3))",
|
||||
},
|
||||
// Test that we can edit an annotation
|
||||
{
|
||||
content: "Open second annotated line annotation popover",
|
||||
trigger: "tr:nth-child(9) .btn_annotation",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open the message actions menu",
|
||||
trigger: ".o-mail-Message:last-child [title='Expand']:not(:visible)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select the edit button",
|
||||
trigger: ".o-mail-Message-moreMenu .btn[name='edit']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Annotate contains previous text value",
|
||||
trigger:
|
||||
".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea:value(Annotation 121000)",
|
||||
},
|
||||
{
|
||||
content: "Add text to annotate",
|
||||
trigger: ".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea",
|
||||
run: "edit Annotation 121000 edited",
|
||||
},
|
||||
{
|
||||
content: "Annotation is edited",
|
||||
trigger:
|
||||
".o-mail-Message:last-child .o-mail-Composer-inputContainer textarea:value(Annotation 121000 edited)",
|
||||
},
|
||||
{
|
||||
content: "Save the annotation",
|
||||
trigger: ".o-mail-Message:last-child .btn[data-type='save']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Close Chatter",
|
||||
trigger: ".o_control_panel .btn-secondary[data-tooltip='Chatter']",
|
||||
run: "click",
|
||||
},
|
||||
// Test that we dont show there is an annotation if we delete the only annotation of a line
|
||||
{
|
||||
content: "Open Third annotated line annotation popover",
|
||||
trigger: "tr:nth-child(13) .btn_annotation",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the messages to load",
|
||||
trigger: ".o-mail-Message",
|
||||
},
|
||||
{
|
||||
content: "Expand the options of the message",
|
||||
trigger: ".o-mail-Message:last-child button:has(i.oi[data-icon='more_vert']):not(:visible)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Click on trash can",
|
||||
trigger: ".o_popover .o-dropdown-item:has(i[data-icon='delete'])",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the modal to appear",
|
||||
trigger: ".modal",
|
||||
},
|
||||
{
|
||||
content: "Confirm deletion of the annotation",
|
||||
trigger: ".modal-footer .btn-danger",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Close Chatter",
|
||||
trigger: ".o_control_panel .btn-secondary[data-tooltip='Chatter']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check there are now only two lines annotated",
|
||||
trigger: "tr:nth-child(13):not(:has([data-icon='mode_comment'].oi-filled))",
|
||||
},
|
||||
{
|
||||
trigger: `.btn_annotation.o_account_report_chatter_annotated:count(2)`,
|
||||
},
|
||||
],
|
||||
});
|
||||
79
account_reports/static/tests/tours/account_reports_audit.js
Normal file
79
account_reports/static/tests/tours/account_reports_audit.js
Normal file
@@ -0,0 +1,79 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_audit", {
|
||||
steps: () => [
|
||||
{
|
||||
trigger: "button.o-kanban-button-new",
|
||||
content: "Create a new Audit",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
isActive: ["auto"],
|
||||
trigger: ".modal",
|
||||
content: "Wait for the modal to open",
|
||||
},
|
||||
{
|
||||
trigger: "div[name='return_type_id'] .o_selection_badge:contains('Audit')",
|
||||
content: "Select the Return Type",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".modal-footer button.btn-primary",
|
||||
content: "Generate the Audit",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: "a[data-tooltip='Back to \"Working Files\"']",
|
||||
content: "Back to the Audit Kanban",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".o_account_return_audit_kanban_view .o_kanban_record:nth-child(1)",
|
||||
content: "Open the working file",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".o_embedded_actions button:contains('Balances')",
|
||||
content: "Switch to the 'Balances' tab",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: ".o_data_row .o_data_cell",
|
||||
content: "Open the chatter for the first row",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Add a log note",
|
||||
trigger: ".o-mail-Chatter-logNote",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Add text to annotate",
|
||||
trigger: ".o-mail-Composer-inputContainer textarea",
|
||||
run: "edit Annotation from the audit",
|
||||
},
|
||||
{
|
||||
content: "Submit by logging the note",
|
||||
trigger: ".o-mail-Composer-send",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Annotation is posted",
|
||||
trigger:
|
||||
".o-mail-Message:last-child .o-mail-Message-textContent:text(Annotation from the audit)",
|
||||
},
|
||||
{
|
||||
trigger:
|
||||
".o_account_reports_annotation:contains(/^Annotated for [0-9]{2}/[0-9]{2}/[0-9]{4}$/)",
|
||||
},
|
||||
{
|
||||
content: "Close Chatter",
|
||||
trigger: ".o_control_panel .btn-secondary[data-tooltip='Chatter']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check that the chatter is closed",
|
||||
trigger: ".o_account_report_chatter:not(:visible)",
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,103 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add('account_reports_hide_0_lines', {
|
||||
steps: () => [
|
||||
{
|
||||
content: 'test if the Bank and Cash line is present (but the value is 0)',
|
||||
trigger: '.line_name:contains("Bank and Cash Accounts")',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: 'test if the Current Year Unallocated Earnings line is present (but the value is 0)',
|
||||
trigger: '.line_name:contains("Current Year Unallocated Earnings")',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: 'test if the Earnings line is present (but value is different from 0 and so should be there after the hide_0_lines',
|
||||
trigger: '.line_name:contains("Earnings")',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Open options selector",
|
||||
trigger: "#filter_extra_options button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the hide line at 0 option",
|
||||
trigger: ".dropdown-item:contains('Hide lines at 0')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: 'test if the Earnings line is still present',
|
||||
trigger: '.line_name:contains("Earnings")',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: 'test if the Bank and Cash line is not present',
|
||||
trigger: '.line_name:not(:contains("Bank and Cash Accounts"))',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: 'test if the Current Year Unallocated Earnings line is not present',
|
||||
trigger: '.line_name:not(:contains("Current Year Unallocated Earnings"))',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Click again to open the options selector",
|
||||
trigger: "#filter_extra_options button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the hide lines at 0 option again",
|
||||
trigger: ".dropdown-item:contains('Hide lines at 0')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: 'test again if the Bank and Cash line is present (but the value is 0)',
|
||||
trigger: '.line_name:contains("Bank and Cash Accounts")',
|
||||
run: () => null,
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
registry.category("web_tour.tours").add('account_reports_hide_0_lines_with_string_columns', {
|
||||
steps: () => [
|
||||
{
|
||||
content: "Check if the 211000 Accounts Payable line is present (but the value is 0)",
|
||||
trigger: "td:contains('211000 Accounts Payable')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check if the MISC item line is present with string values set up, but all amounts are at 0",
|
||||
trigger: "td:contains('Coucou les biloutes')",
|
||||
},
|
||||
{
|
||||
content: "Open options selector",
|
||||
trigger: "#filter_extra_options button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the hide line at 0 option",
|
||||
trigger: ".dropdown-item:contains('Hide lines at 0')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Check if the MISC item line is hidden",
|
||||
trigger: ":not(:visible):contains('Coucou les biloutes')",
|
||||
},
|
||||
{
|
||||
content: "Click again to open the options selector",
|
||||
trigger: "#filter_extra_options button",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Select the hide lines at 0 option again",
|
||||
trigger: ".dropdown-item:contains('Hide lines at 0')",
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: "Check again if the MISC item line is present (but the value is 0)",
|
||||
trigger: "td:contains('Coucou les biloutes')",
|
||||
},
|
||||
]
|
||||
});
|
||||
@@ -0,0 +1,88 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_load_more", {
|
||||
steps: () => [
|
||||
/*
|
||||
When opening the report:
|
||||
- 1 partner is shown
|
||||
- 2 more in "load more"
|
||||
- All lines are folded, first partner has 2 move lines to report, when unfolded (with a "1 more" after the first unfold)
|
||||
*/
|
||||
{
|
||||
content: "Check default-loaded lines",
|
||||
trigger: "tr:nth-child(2) td:nth-child(1)",
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(3) td:nth-child(1):contains(partner_a)`,
|
||||
},
|
||||
{
|
||||
content: "Unfold first partner",
|
||||
trigger: "tr:nth-child(3) td:first().unfoldable",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "First partner should be unfolded",
|
||||
trigger: "tr td:nth-child(1):contains('INV/2016/00001')",
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(3) td:nth-child(1):contains(partner_a)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(4) td:nth-child(1):contains(INV/2016/00001)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(5) td:nth-child(1) a:text(1 more)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(6) td:nth-child(1):contains(Total partner_a)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(7) td:nth-child(1) a:text(2 more)`,
|
||||
},
|
||||
{
|
||||
content: "Load more the first partner's move",
|
||||
trigger: "a:text('1 more')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(3) td:nth-child(1):contains(partner_a)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(4) td:nth-child(1):contains(INV/2016/00002)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(5) td:nth-child(1):contains(INV/2016/00001)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(6) td:nth-child(1):contains(Total partner_a)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(7) td:nth-child(1) a:text(2 more)`,
|
||||
},
|
||||
{
|
||||
content: "Load more the other partners",
|
||||
trigger: "a:text('2 more')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content:
|
||||
"All partners should be shown ; the expanded and loaded lines from partner 1 should still be there",
|
||||
trigger: "tr td:nth-child(1):contains('partner_c')",
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(3) td:nth-child(1):contains(partner_a)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(4) td:nth-child(1):contains(INV/2016/00002)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(5) td:nth-child(1):contains(INV/2016/00001)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(6) td:nth-child(1):contains(Total partner_a)`,
|
||||
},
|
||||
{
|
||||
trigger: `tr:nth-child(7) td:nth-child(1):contains(partner_b)`,
|
||||
},
|
||||
],
|
||||
});
|
||||
40
account_reports/static/tests/tours/account_reports_search.js
Normal file
40
account_reports/static/tests/tours/account_reports_search.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add('account_reports_search', {
|
||||
steps: () => [
|
||||
{
|
||||
content: "click search",
|
||||
trigger: '.o_searchview_input',
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: 'insert text in the searchbar',
|
||||
trigger: '.o_searchview_input',
|
||||
run: "edit 40",
|
||||
},
|
||||
{
|
||||
content: 'test if the product sale line is present',
|
||||
trigger: '.line_name:contains("400000 Product Sales")',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "click search",
|
||||
trigger: '.o_searchview_input',
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: 'insert text in the search bar',
|
||||
trigger: '.o_searchview_input',
|
||||
run: "edit Account",
|
||||
},
|
||||
{
|
||||
content: 'test if the receivable line is present',
|
||||
trigger: '.line_name:contains("121000 Accounts Receivable")',
|
||||
run: 'click',
|
||||
},
|
||||
{
|
||||
content: 'check that the product sale line is not present',
|
||||
trigger: '.line_name:not(:contains("400000 Product Sales"))',
|
||||
},
|
||||
]
|
||||
});
|
||||
141
account_reports/static/tests/tours/account_reports_sections.js
Normal file
141
account_reports/static/tests/tours/account_reports_sections.js
Normal file
@@ -0,0 +1,141 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_sections", {
|
||||
steps: () => [
|
||||
{
|
||||
content: "Open variant selector",
|
||||
trigger: "#filter_variant button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select the test variant using sections",
|
||||
trigger: ".dropdown-item:contains('Test Sections')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check the lines of section 1 are displayed",
|
||||
trigger: ".line_name:contains('Section 1 line')",
|
||||
},
|
||||
{
|
||||
content: "Check the columns of section 1 are displayed",
|
||||
trigger: "#table_header th:contains('Column 1')",
|
||||
},
|
||||
{
|
||||
content: "Check the export buttons belong to the composite report",
|
||||
trigger: ".btn:contains('composite_report_custom_button')",
|
||||
},
|
||||
{
|
||||
content:
|
||||
"Check the filters displayed belong to section 1 (journals filter is not enabled on section 2, nor the composite report)",
|
||||
trigger: "#filter_journal",
|
||||
},
|
||||
{
|
||||
content: "Open date switcher",
|
||||
trigger: "#filter_date button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select 'month' date filter",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='month']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Click on the current period to edit it manually",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='month'] .input_current_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content:
|
||||
"Make sure December 2025 is opened, whatever the return type linked to the report",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='month'] .input_current_date",
|
||||
run: "edit 12/2025",
|
||||
},
|
||||
{
|
||||
content: "Click outside of the input to validate the choice",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='month']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for the date to be refreshed",
|
||||
trigger: `#filter_date button:contains('Dec 2025')`,
|
||||
},
|
||||
{
|
||||
content: "Switch to section 2",
|
||||
trigger: "#section_selector .btn:contains('Section 2')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check the lines of section 2 are displayed",
|
||||
trigger: ".line_name:contains('Section 2 line')",
|
||||
},
|
||||
{
|
||||
content: "Check the columns of section 2 are displayed",
|
||||
trigger: "#table_header th:contains('Column 2')",
|
||||
},
|
||||
{
|
||||
content: "Check the export buttons belong to the composite report",
|
||||
trigger: ".btn:contains('composite_report_custom_button')",
|
||||
},
|
||||
{
|
||||
content:
|
||||
"Check the filters displayed belong to section 2 (comparison filter is not enabled on section 1, nor the composite report)",
|
||||
trigger: "#filter_comparison",
|
||||
},
|
||||
{
|
||||
content: "Open date switcher",
|
||||
trigger: "#filter_date button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select another date in the future",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='year'] .btn_next_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Apply filter by closing the dropdown for the future date",
|
||||
trigger: "#filter_date .btn:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check that the date has changed",
|
||||
trigger: `#filter_date button:not(:contains(2025)):contains(2026)`,
|
||||
},
|
||||
{
|
||||
content: "Open date switcher",
|
||||
trigger: "#filter_date button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select another date first time",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='year'] .btn_previous_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: `.dropdown-menu .dropdown-item[data-period-type='year'] input[data-value*='2025']`,
|
||||
},
|
||||
{
|
||||
content: "Select another date second time",
|
||||
trigger: ".dropdown-menu .dropdown-item[data-period-type='year'] .btn_previous_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: `.dropdown-menu .dropdown-item[data-period-type='year'] input[data-value*='2024']`,
|
||||
},
|
||||
{
|
||||
content: "Apply filter by closing the dropdown",
|
||||
trigger: "#filter_date .btn:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check that the date has changed",
|
||||
trigger: `#filter_date button:contains('2024')`,
|
||||
},
|
||||
{
|
||||
content: "Switch back to section 1",
|
||||
trigger: "#section_selector .btn:contains('Section 1')",
|
||||
run: "click",
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,86 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("account_reports_widgets", {
|
||||
steps: () => [
|
||||
{
|
||||
content: "change date filter",
|
||||
trigger: "#filter_date button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select another date in the future",
|
||||
trigger: ".dropdown-menu .dropdown-item:nth-child(3) .btn_next_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Apply filter by closing the dropdown",
|
||||
trigger: "#filter_date .btn:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "wait refresh",
|
||||
trigger: `#filter_date button:not(:contains(${new Date().getFullYear()}))`,
|
||||
},
|
||||
{
|
||||
content: "change date filter for the second time",
|
||||
trigger: "#filter_date button",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select another date in the past first time",
|
||||
trigger: ".dropdown-menu .dropdown-item:nth-child(3) .btn_previous_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: `.dropdown-menu .dropdown-item:nth-child(3) input[data-value*='${new Date().getFullYear()}']`,
|
||||
},
|
||||
{
|
||||
content: "Select another date in the past second time",
|
||||
trigger: ".dropdown-menu .dropdown-item:nth-child(3) .btn_previous_date",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: `.dropdown-menu .dropdown-item:nth-child(3) input[data-value*='${
|
||||
new Date().getFullYear() - 1
|
||||
}']`,
|
||||
},
|
||||
{
|
||||
content: "Apply filter by closing the dropdown",
|
||||
trigger: "#filter_date .btn:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "wait refresh",
|
||||
trigger: `#filter_date button:contains(${new Date().getFullYear() - 1})`,
|
||||
},
|
||||
{
|
||||
content: "change comparison filter",
|
||||
trigger: "#filter_comparison .btn:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "select custom comparison dates",
|
||||
trigger: "[name='filter_comparison_custom']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Apply filter by closing the dropdown",
|
||||
trigger: "#filter_comparison .btn:first()",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "wait refresh, report should have comparison columns",
|
||||
trigger: "th + th + th + th",
|
||||
},
|
||||
{
|
||||
content: "Open actions dropdown",
|
||||
trigger: ".o_control_panel_breadcrumbs_actions .dropdown-toggle",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Export XLSX",
|
||||
trigger: ".dropdown-item:contains('XLSX')",
|
||||
run: "click",
|
||||
},
|
||||
],
|
||||
});
|
||||
66
account_reports/static/tests/tours/account_return.js
Normal file
66
account_reports/static/tests/tours/account_return.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("account_return_flow_tax_return", {
|
||||
steps: () => [
|
||||
{
|
||||
content: "Open Tax Returns",
|
||||
trigger: "button[name='account_reports.action_server_open_view_account_return']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Check First Group Header",
|
||||
trigger: ".o_account_return_padding:text(December 2023)",
|
||||
},
|
||||
{
|
||||
content: "Open Return",
|
||||
trigger: ".o_account-return-kanban .o_kanban_record span:contains('DUMMY_TAX')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for Checks",
|
||||
trigger: ".kanban_checks_view",
|
||||
},
|
||||
{
|
||||
content: "Approve Company Data",
|
||||
trigger: "div.o_field_account_review_state_selection_badge > button.btn-outline-danger",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Select Valid Ckeck Status",
|
||||
trigger: "div.o_popover > span:nth-child(3)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Validate Return",
|
||||
trigger: "button[name='action_validate']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Verify State Advancement",
|
||||
trigger: ".o_account_return_state > div.active:count(1)",
|
||||
},
|
||||
{
|
||||
content: "Open Tax Return Report",
|
||||
trigger: "button.btn-primary[name='action_open_report']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Wait for report to be shown",
|
||||
trigger: ".account_report",
|
||||
},
|
||||
{
|
||||
content: "Go back To Return",
|
||||
trigger: ".o_breadcrumb .breadcrumb-item a",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Submit Return",
|
||||
trigger: "button[name='action_submit']",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "Verify State Advancement",
|
||||
trigger: ".o_account_return_state > div.active:count(3)",
|
||||
},
|
||||
],
|
||||
});
|
||||
25
account_reports/static/tests/tours/test_tour_bank_rec_ui.js
Normal file
25
account_reports/static/tests/tours/test_tour_bank_rec_ui.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { accountTourSteps } from "@account/js/tours/account";
|
||||
|
||||
patch(accountTourSteps, {
|
||||
bankRecUiReportSteps() {
|
||||
return [
|
||||
{
|
||||
trigger: ".o_bank_rec_selected_st_line:contains('line1')",
|
||||
},
|
||||
{
|
||||
content: "balance is 2100",
|
||||
trigger: ".btn-link:contains('$ 2,100.00')",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: "span:contains('General Ledger')",
|
||||
},
|
||||
{
|
||||
content: "Breadcrumb back to Bank Reconciliation from the report",
|
||||
trigger: ".breadcrumb-item a:contains('Bank Reconciliation')",
|
||||
run: "click",
|
||||
},
|
||||
];
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user