This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/tests/wdio/test/specs/new-wizard-ldap-application.ts

36 lines
1.6 KiB
TypeScript
Raw Normal View History

import { login } from "../utils/login.js";
import { randomId } from "../utils/index.js";
import ApplicationsListPage from "../pageobjects/applications-list.page.js";
2023-09-25 22:46:19 +00:00
import ApplicationWizardView from "../pageobjects/application-wizard.page.js";
import { expect } from "@wdio/globals";
2023-09-25 22:46:19 +00:00
describe("Configure LDAP Application with Wizard", () => {
it("Should configure a simple LDAP Application", async () => {
const newPrefix = randomId();
await login();
await ApplicationsListPage.open();
expect(await ApplicationsListPage.pageHeader).toHaveText("Applications");
await ApplicationsListPage.startWizardButton.click();
2023-09-25 22:46:19 +00:00
await ApplicationWizardView.wizardTitle.waitForDisplayed();
expect(await ApplicationWizardView.wizardTitle).toHaveText("New Application");
2023-09-25 22:46:19 +00:00
await ApplicationWizardView.app.name.setValue(`New LDAP Application - ${newPrefix}`);
await ApplicationWizardView.nextButton.click();
await ApplicationWizardView.pause()
await ApplicationWizardView.providerList.waitForDisplayed();
await ApplicationWizardView.providerList.$('>>>input[value=ldapprovider]').click();
await ApplicationWizardView.nextButton.click();
await ApplicationWizardView.pause()
await ApplicationWizardView.ldap.setBindFlow('default-authentication-flow');
await ApplicationWizardView.nextButton.click();
await ApplicationWizardView.pause()
await ApplicationWizardView.commitMessage.waitForDisplayed();
expect(await ApplicationWizardView.commitMessage).toHaveText("Your application has been saved");
})
});