qbo_auth: на странице ручных тестов краткие сценарии со ссылками
Some checks failed
ci / deploy (push) Has been cancelled
ci / test (push) Successful in 38s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 10:18:17 +03:00
parent 065eee0bad
commit a35240165b
2 changed files with 21 additions and 0 deletions

View File

@@ -13,6 +13,26 @@ export const TESTS_PAGE = `<!doctype html><html lang="ru"><head><meta charset="u
<textarea id="note" rows="2" maxlength="500"></textarea>
<button id="send">Отправить</button>
<pre id="out">Результат появится здесь.</pre>
<h2>Сценарии (кратко)</h2>
<h3>1. Отключение, подключение, повторное подключение</h3>
<ol>
<li>«Статус» - connected: true.</li>
<li>«Отключить» - revoked: true, removed: true; «Статус» - connected: false.</li>
<li>«Подключить» - в новой вкладке войти в Intuit администратором, выбрать sandbox-компанию, Connect; ожидается «QuickBooks подключён».</li>
<li>«Статус» - connected: true; «Синхронизация» - 200 ok.</li>
</ol>
<h3>2. Отключение со стороны QuickBooks</h3>
<ol>
<li>Открыть <a href="https://sandbox.qbo.intuit.com/app/appcenter/myapps" target="_blank" rel="noopener">QuickBooks sandbox: My integrations</a>, у KHBuild_assistant меню (три точки), Disconnect.</li>
<li>Здесь «Синхронизация» - ожидается 409 reauth_needed; «Статус» - connected: false.</li>
<li>«Подключить», пройти авторизацию, «Синхронизация» - 200 ok.</li>
</ol>
<h3>Вебхук и данные</h3>
<ul>
<li><a href="https://developer.intuit.com/app/developer/dashboard" target="_blank" rel="noopener">Портал Intuit</a>: приложение, Webhooks, development, «Send test event», qbo.bill.created.v1.</li>
<li>Данные: создать Bill в <a href="https://sandbox.qbo.intuit.com" target="_blank" rel="noopener">QuickBooks sandbox</a> и написать заметку выше.</li>
<li><a href="https://help.developer.intuit.com/s/questionnaire" target="_blank" rel="noopener">Анкета Intuit</a>.</li>
</ul>
<script>
const $=id=>document.getElementById(id), out=$('out');
const base=location.pathname.replace(/[/]$/,"");

View File

@@ -53,6 +53,7 @@ describe("вебхук Intuit", () => {
const page = await app.inject({ url: `/tests/${slug}` });
expect(page.statusCode).toBe(200);
expect(page.body).toContain("location.pathname");
expect(page.body).toContain("sandbox.qbo.intuit.com/app/appcenter/myapps");
expect(page.headers["cache-control"]).toBe("no-cache, no-store");
expect(page.headers["referrer-policy"]).toBe("no-referrer");
const h = { "content-type": "application/json" };