mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
* fix(providers): unify connection and routing flows * docs(changelog): add provider flow consistency entry * test(providers): move section-visibility cases to own file (test file-size cap) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * refactor(api): extract fetchLiveNoAuthModels + toLiveModel helpers (cognitive-complexity gate on buildNoAuthModelsResponse) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: nguyenha935 <208228297+nguyenha935@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
18 lines
784 B
TypeScript
18 lines
784 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const providerPageUtils = await import(
|
|
"../../src/app/(dashboard)/dashboard/providers/providerPageUtils.ts"
|
|
);
|
|
|
|
test("default provider view hides cross-cutting sections that duplicate primary cards", () => {
|
|
const { shouldShowProviderSection } = providerPageUtils;
|
|
|
|
assert.equal(shouldShowProviderSection("oauth", null, false), true);
|
|
assert.equal(shouldShowProviderSection("free", null, false), false);
|
|
assert.equal(shouldShowProviderSection("webfetch", null, false), false);
|
|
assert.equal(shouldShowProviderSection("webfetch", "webfetch", false), true);
|
|
assert.equal(shouldShowProviderSection("free", null, true), true);
|
|
assert.equal(shouldShowProviderSection("oauth", null, true), false);
|
|
});
|