1
import LoginPage from "../support/pages/LoginPage";
2
import Masthead from "../support/pages/admin-ui/Masthead";
3
import ListingPage from "../support/pages/admin-ui/ListingPage";
4
import SidebarPage from "../support/pages/admin-ui/SidebarPage";
5
import adminClient from "../support/util/AdminClient";
6
import { keycloakBefore } from "../support/util/keycloak_hooks";
7
import { AdvancedSamlTab } from "../support/pages/admin-ui/manage/clients/client_details/tabs/AdvancedSamlTab";
8
import ClientDetailsPage from "../support/pages/admin-ui/manage/clients/client_details/ClientDetailsPage";
10
const loginPage = new LoginPage();
11
const masthead = new Masthead();
12
const sidebarPage = new SidebarPage();
13
const listingPage = new ListingPage();
14
const advancedTab = new AdvancedSamlTab();
16
describe("Clients Saml advanced tab", () => {
17
describe("Fine Grain SAML Endpoint Configuration", () => {
18
const clientName = "advanced-tab";
21
adminClient.createClient({
29
adminClient.deleteClient(clientName);
35
sidebarPage.goToClients();
36
listingPage.searchItem(clientName).goToItemDetails(clientName);
37
new ClientDetailsPage().goToAdvancedTab();
40
it("Should Terms of service URL", () => {
41
const termsOfServiceUrl = "http://some.url/terms-of-service.html";
42
advancedTab.termsOfServiceUrl(termsOfServiceUrl).saveFineGrain();
43
masthead.checkNotificationMessage("Client successfully updated");
46
.termsOfServiceUrl("http://not.saveing.this/")
48
advancedTab.checkTermsOfServiceUrl(termsOfServiceUrl);
51
it("Invalid terms of service URL", () => {
52
advancedTab.termsOfServiceUrl("not a url").saveFineGrain();
54
masthead.checkNotificationMessage(
55
"Client could not be updated: Terms of service URL is not a valid URL",