Add tests for bearer-only client details (#1270)
This commit is contained in:
parent
4d5c8f3f18
commit
8e8c6d74ea
2 changed files with 39 additions and 2 deletions
|
@ -258,4 +258,33 @@ describe("Clients test", function () {
|
||||||
cy.findByTestId("delete-client").should("not.exist");
|
cy.findByTestId("delete-client").should("not.exist");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Bearer only", () => {
|
||||||
|
const clientId = "bearer-only";
|
||||||
|
|
||||||
|
before(() => {
|
||||||
|
new AdminClient().createClient({
|
||||||
|
clientId,
|
||||||
|
protocol: "openid-connect",
|
||||||
|
publicClient: false,
|
||||||
|
bearerOnly: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
after(() => {
|
||||||
|
new AdminClient().deleteClient(clientId);
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
keycloakBefore();
|
||||||
|
loginPage.logIn();
|
||||||
|
sidebarPage.goToClients();
|
||||||
|
listingPage.searchItem(clientId).goToItemDetails(clientId);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("shows an explainer text for bearer only clients", () => {
|
||||||
|
cy.findByTestId("bearer-only-explainer-label").trigger("mouseenter");
|
||||||
|
cy.findByTestId("bearer-only-explainer-tooltip").should("exist");
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -89,8 +89,16 @@ const ClientDetailHeader = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = client.bearerOnly ? (
|
const text = client.bearerOnly ? (
|
||||||
<Tooltip content={t("explainBearerOnly")}>
|
<Tooltip
|
||||||
<Label icon={<InfoCircleIcon />}>{client.protocol}</Label>
|
data-testid="bearer-only-explainer-tooltip"
|
||||||
|
content={t("explainBearerOnly")}
|
||||||
|
>
|
||||||
|
<Label
|
||||||
|
data-testid="bearer-only-explainer-label"
|
||||||
|
icon={<InfoCircleIcon />}
|
||||||
|
>
|
||||||
|
{client.protocol}
|
||||||
|
</Label>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : (
|
) : (
|
||||||
<Label>{client.protocol}</Label>
|
<Label>{client.protocol}</Label>
|
||||||
|
|
Loading…
Reference in a new issue