Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add change-password redirect to help Password-managers #5794

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import ChangePasswordPage from '@121-e2e/portalicious/pages/ChangePasswordPage';
import LoginPage from '@121-e2e/portalicious/pages/LoginPage';
import { SeedScript } from '@121-service/src/scripts/seed-script.enum';
import { resetDB } from '@121-service/test/helpers/utility.helper';
import { test } from '@playwright/test';

test.beforeEach(async ({ page }) => {
await resetDB(SeedScript.test);

// Login
const loginPage = new LoginPage(page);
await page.goto('/');
await loginPage.login(
process.env.USERCONFIG_121_SERVICE_EMAIL_ADMIN,
process.env.USERCONFIG_121_SERVICE_PASSWORD_ADMIN,
);
});

test('Change password redirect', async ({ page }) => {
const changePasswordPage = new ChangePasswordPage(page);

await test.step('Should bring the user to the Change-Password-page from a well-known URL', async () => {
await page.goto('/.well-known/change-password');

await changePasswordPage.changePasswordButton.isVisible();
});
});
5 changes: 5 additions & 0 deletions interfaces/Portalicious/staticwebapp.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"Cache-Control": "must-revalidate, no-transform, max-age=0, no-store"
}
},
{
"route": "/.well-known/change-password",
"redirect": "/en/change-password",
"statusCode": 302
},
{
"route": "*.{js,json,css,jpg,jpeg,png,ico,webmanifest,tff,woff,woff2}",
"headers": {
Expand Down
Loading