billing: Add sponsorship request form to the billing page.

Previously this was only available on the upgrade page - meaning an
organization that already bought a plan wouldn't be able to request a
sponsorship to get a discount or such, even if qualified.
This commit is contained in:
Mateusz Mandera
2023-02-13 20:40:51 +01:00
committed by Tim Abbott
parent cf55e66c74
commit 684430faa2
10 changed files with 140 additions and 72 deletions

View File

@@ -20,6 +20,7 @@ const location = set_global("location", {});
const helpers = mock_esm("../src/billing/helpers", {
set_tab() {},
set_sponsorship_form() {},
});
zrequire("billing/billing");
@@ -30,8 +31,13 @@ run_test("initialize", ({override}) => {
assert.equal(page_name, "billing");
set_tab_called = true;
});
let set_sponsorship_form_called = false;
override(helpers, "set_sponsorship_form", () => {
set_sponsorship_form_called = true;
});
$.get_initialize_function()();
assert.ok(set_tab_called);
assert.ok(set_sponsorship_form_called);
});
run_test("card_update", ({override}) => {