diff options
| author | Leonardo Rochael Almeida <leorochael@gmail.com> | 2016-12-30 11:13:34 -0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-03-03 10:17:33 +0100 |
| commit | bf8cc11e7e8bae4b3c49e5cb76a1556a6abfdea6 (patch) | |
| tree | 6d7ee8092f91ffa7a61c97bae792854abffb2a30 /addons/note/data/note_data.xml | |
| parent | 2580a6d04d4296fc3ed9a2b896f79c136b42cc91 (diff) | |
[FIX] web: QUnit context in js tests
Previously, the context for `options.{before,after}Each()` functions was
isolated from the context created by the odoo `test` function, making
it impossible to save attributes in the test during
`options.beforeEach()` that are accessible from the test itself, or to
clear resources created in the test in `options.afterEach()`
Moreover, the odoo test infrastructure was set up completely inside the
test wrapper, after `options.beforeContext()` had already run, making
it impossible for `options.beforeContext()` to use this infrastructure.
Here we use the QUnit context directly in the test, but move the
initialization previously done in the test wrapper to a `beforeEach`
wrapper (and, symetrically, on `afterEach`), making it possible to use
the odoo infrastructure in the javascript test setup, including
declared section dependencies.
Diffstat (limited to 'addons/note/data/note_data.xml')
0 files changed, 0 insertions, 0 deletions
