Skip to content

Commit

Permalink
[FIX] web: fix the test case related to the year
Browse files Browse the repository at this point in the history
Before this commit, since we are no longer in 2023, the test failed
because there is no longer 2021 in the filters dynamically added in the
dropdown of the date filter. The reason is now we have the current year,
the previous one, and the one before, that is, 2024, 2023, 2022.

This commit adds a patchDate to be sure we will start the test in 2023,
to get the expected filters displayed (2023, 2022, 2021).

closes #147899

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
  • Loading branch information
emi-odoo committed Jan 3, 2024
1 parent a543ebd commit adb6739
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/web/static/tests/views/pivot_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3139,6 +3139,7 @@ QUnit.module('Views', {

QUnit.test('comparison with two groupbys: rows from reference period should be displayed', async function (assert) {
assert.expect(3);
patchDate(2023, 2, 22, 1, 0, 0);

this.data.partner.records = [
{ id: 1, date: "2021-10-10", product_id: 1, customer: 1 },
Expand Down

0 comments on commit adb6739

Please sign in to comment.