c05ff4cca1
This commit continues the application wizard buildout. In this commit are the following changes: - Fixed a width-setting bug in the Makefile `make help` feature (i.e "automate that stuff!") - Added Radius to the list of providers we can offer via the wizard - Added `launchUrl` and `UI Settings` to features of the application page the wizard can find - Changed 'SAML Manual Configuration' to just say "SAML Configuration" - Modified `ak-form-group` to take and honor the `aria-label` property (which in turn makes it easier to target specific forms with unit testing) - Reduced the log level for wdio to 'warn'; 'info' was super-spammy and not helpful. It can be put back with `--logLevel info` from the command line.
76 lines
2.2 KiB
TypeScript
76 lines
2.2 KiB
TypeScript
import AdminPage from "./admin.page.js";
|
|
import ApplicationForm from "./forms/application.form.js";
|
|
import LdapForm from "./forms/ldap.form.js";
|
|
import OauthForm from "./forms/oauth.form.js";
|
|
import TransparentProxyForm from "./forms/transparent-proxy.form.js";
|
|
import ForwardProxyForm from "./forms/forward-proxy.form.js";
|
|
import SamlForm from "./forms/saml.form.js";
|
|
import ScimForm from "./forms/scim.form.js";
|
|
import RadiusForm from "./forms/radius.form.js";
|
|
import { $ } from "@wdio/globals";
|
|
|
|
/**
|
|
* sub page containing specific selectors and methods for a specific page
|
|
*/
|
|
|
|
class ApplicationWizardView extends AdminPage {
|
|
/**
|
|
* define selectors using getter methods
|
|
*/
|
|
|
|
ldap = LdapForm;
|
|
oauth = OauthForm;
|
|
transparentProxy = TransparentProxyForm;
|
|
forwardProxy = ForwardProxyForm;
|
|
saml = SamlForm;
|
|
scim = ScimForm;
|
|
radius = RadiusForm;
|
|
app = ApplicationForm;
|
|
|
|
get wizardTitle() {
|
|
return $(">>>ak-wizard-frame .pf-c-wizard__header h1.pf-c-title");
|
|
}
|
|
|
|
get providerList() {
|
|
return $(">>>ak-application-wizard-authentication-method-choice");
|
|
}
|
|
|
|
get nextButton() {
|
|
return $(">>>ak-wizard-frame footer button.pf-m-primary");
|
|
}
|
|
|
|
async getProviderType(type: string) {
|
|
return await this.providerList.$(`>>>input[value="${type}"]`);
|
|
}
|
|
|
|
get successMessage() {
|
|
return $('>>>[data-commit-state="success"]')
|
|
}
|
|
}
|
|
|
|
type Pair = [string, string];
|
|
|
|
// Define a getter for each provider type in the radio button collection.
|
|
|
|
const providerValues: Pair[] = [
|
|
["oauth2provider", "oauth2Provider"],
|
|
["ldapprovider", "ldapProvider"],
|
|
["proxyprovider-proxy", "proxyProviderProxy"],
|
|
["proxyprovider-forwardsingle", "proxyProviderForwardsingle"],
|
|
["radiusprovider", "radiusProvider"],
|
|
["samlprovider", "samlProvider"],
|
|
["scimprovider", "scimProvider"],
|
|
];
|
|
|
|
providerValues.forEach(([value, name]: Pair) => {
|
|
Object.defineProperties(ApplicationWizardView.prototype, {
|
|
[name]: {
|
|
get: function () {
|
|
return this.providerList.$(`>>>input[value="${value}"]`);
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
export default new ApplicationWizardView();
|