mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-06 14:05:21 +02:00
feat: Migrate to Nuxt 3 framework (#5184)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
parent
89ab7fac25
commit
c24d532608
403 changed files with 23959 additions and 19557 deletions
|
@ -5,11 +5,9 @@ test('password login', async ({ page }) => {
|
|||
const password = "MyPassword"
|
||||
const name = "Change Me"
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.getByLabel('Email or Username').click();
|
||||
await page.getByLabel('Email or Username').fill(username);
|
||||
await page.locator('div').filter({ hasText: /^Password$/ }).nth(3).click();
|
||||
await page.getByLabel('Password').fill(password);
|
||||
await page.goto('/login');
|
||||
await page.getByLabel('Email or Username', { exact: true }).fill(username);
|
||||
await page.getByLabel('Password', { exact: true }).fill(password);
|
||||
await page.getByRole('button', { name: 'Login', exact: true }).click();
|
||||
// skip admin setup page
|
||||
await page.getByRole('link', { name: "I'm already set up, just bring me to the homepage" }).click();
|
||||
|
@ -21,12 +19,11 @@ test('ldap login', async ({ page }) => {
|
|||
const password = "bender"
|
||||
const name = "Bender Bending Rodríguez"
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.getByLabel('Email or Username').click();
|
||||
await page.getByLabel('Email or Username').fill(username);
|
||||
await page.locator('div').filter({ hasText: /^Password$/ }).nth(3).click();
|
||||
await page.getByLabel('Password').fill(password);
|
||||
await page.goto('/login');
|
||||
await page.getByLabel('Email or Username', { exact: true }).fill(username);
|
||||
await page.getByLabel('Password', { exact: true }).fill(password);
|
||||
await page.getByRole('button', { name: 'Login', exact: true }).click();
|
||||
await expect(page).toHaveURL(/\/g\/home/);
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await expect(page.getByRole('link', { name: 'Settings' })).not.toBeVisible();
|
||||
});
|
||||
|
@ -36,11 +33,9 @@ test('ldap admin login', async ({ page }) => {
|
|||
const password = "professor"
|
||||
const name = "Hubert J. Farnsworth"
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.getByLabel('Email or Username').click();
|
||||
await page.getByLabel('Email or Username').fill(username);
|
||||
await page.locator('div').filter({ hasText: /^Password$/ }).nth(3).click();
|
||||
await page.getByLabel('Password').fill(password);
|
||||
await page.goto('/login');
|
||||
await page.getByLabel('Email or Username', { exact: true }).fill(username);
|
||||
await page.getByLabel('Password', { exact: true }).fill(password);
|
||||
await page.getByRole('button', { name: 'Login', exact: true }).click();
|
||||
// skip admin setup page
|
||||
await page.getByRole('link', { name: "I'm already set up, just bring me to the homepage" }).click();
|
||||
|
@ -59,11 +54,12 @@ test('oidc initial login', async ({ page }) => {
|
|||
"groups": ["user"]
|
||||
}
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.goto('/login');
|
||||
await page.getByRole('button', { name: 'Login with OAuth' }).click();
|
||||
await page.getByPlaceholder('Enter any user/subject').fill(username);
|
||||
await page.getByPlaceholder('Optional claims JSON value,').fill(JSON.stringify(claims));
|
||||
await page.getByRole('button', { name: 'Sign-in' }).click();
|
||||
await expect(page).toHaveURL(/\/g\/home/);
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await expect(page.getByRole('link', { name: 'Settings' })).not.toBeVisible();
|
||||
});
|
||||
|
@ -79,12 +75,12 @@ test('oidc login with user not in propery group', async ({ page }) => {
|
|||
"groups": []
|
||||
}
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.goto('/login');
|
||||
await page.getByRole('button', { name: 'Login with OAuth' }).click();
|
||||
await page.getByPlaceholder('Enter any user/subject').fill(username);
|
||||
await page.getByPlaceholder('Optional claims JSON value,').fill(JSON.stringify(claims));
|
||||
await page.getByRole('button', { name: 'Sign-in' }).click();
|
||||
await expect(page).toHaveURL(/.*\/login\/?\?direct=1/)
|
||||
await expect(page).toHaveURL(/\/login\?direct=1/);
|
||||
await expect(page.getByRole('button', { name: 'Login with OAuth' })).toBeVisible()
|
||||
});
|
||||
|
||||
|
@ -99,20 +95,21 @@ test('oidc sequential login', async ({ page }) => {
|
|||
"groups": ["user"]
|
||||
}
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.goto('/login');
|
||||
await page.getByRole('button', { name: 'Login with OAuth' }).click();
|
||||
await page.getByPlaceholder('Enter any user/subject').fill(username);
|
||||
await page.getByPlaceholder('Optional claims JSON value,').fill(JSON.stringify(claims));
|
||||
await page.getByRole('button', { name: 'Sign-in' }).click();
|
||||
await expect(page).toHaveURL(/\/g\/home/, { timeout: 15000 });
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await page.getByRole('button', { name: 'Logout' }).click();
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await expect(page).toHaveURL(/\/login\?direct=1/);
|
||||
await page.getByRole('button', { name: 'Login with OAuth' }).click();
|
||||
await page.getByPlaceholder('Enter any user/subject').fill(username);
|
||||
await page.getByPlaceholder('Optional claims JSON value,').fill(JSON.stringify(claims));
|
||||
await page.getByRole('button', { name: 'Sign-in' }).click();
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await expect(page.getByRole('navigation')).toContainText(name, { timeout: 15000 });
|
||||
});
|
||||
|
||||
test('settings page verify oidc', async ({ page }) => {
|
||||
|
@ -126,7 +123,7 @@ test('settings page verify oidc', async ({ page }) => {
|
|||
"groups": ["user"]
|
||||
}
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.goto('/login');
|
||||
await page.getByRole('button', { name: 'Login with OAuth' }).click();
|
||||
await page.getByPlaceholder('Enter any user/subject').fill(username);
|
||||
await page.getByPlaceholder('Optional claims JSON value,').fill(JSON.stringify(claims));
|
||||
|
@ -134,18 +131,20 @@ test('settings page verify oidc', async ({ page }) => {
|
|||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await page.getByRole('button', { name: 'Logout' }).click();
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await expect(page).toHaveURL(/\/login\?direct=1/);
|
||||
await page.getByLabel('Email or Username').click();
|
||||
await page.getByLabel('Email or Username').fill('changeme@example.com');
|
||||
await page.getByLabel('Password').click();
|
||||
await page.getByLabel('Password').fill('MyPassword');
|
||||
await page.getByLabel('Password', { exact: true }).click();
|
||||
await page.getByLabel('Password', { exact: true }).fill('MyPassword');
|
||||
await page.getByRole('button', { name: 'Login', exact: true }).click();
|
||||
// skip admin setup page
|
||||
await expect(page).toHaveURL(/\/admin\/setup/, { timeout: 15000 });
|
||||
await page.getByRole('link', { name: "I'm already set up, just bring me to the homepage" }).click();
|
||||
await page.getByRole('link', { name: 'Settings' }).click();
|
||||
await page.getByRole('link', { name: 'Users' }).click();
|
||||
await expect(page).toHaveURL(/\/g\/home/);
|
||||
// validate user settings
|
||||
await page.goto('/admin/manage/users');
|
||||
await page.getByRole('cell', { name: username, exact: true }).click();
|
||||
await expect(page.getByText('Permissions Administrator')).toBeVisible();
|
||||
await expect(page.getByText('Administrator')).toBeVisible();
|
||||
});
|
||||
|
||||
test('oidc admin user', async ({ page }) => {
|
||||
|
@ -159,12 +158,13 @@ test('oidc admin user', async ({ page }) => {
|
|||
"groups": ["user", "admin"]
|
||||
}
|
||||
|
||||
await page.goto('http://localhost:9000/login');
|
||||
await page.goto('/login');
|
||||
await page.getByRole('button', { name: 'Login with OAuth' }).click();
|
||||
await page.getByPlaceholder('Enter any user/subject').fill(username);
|
||||
await page.getByPlaceholder('Optional claims JSON value,').fill(JSON.stringify(claims));
|
||||
await page.getByRole('button', { name: 'Sign-in' }).click();
|
||||
// skip admin setup page
|
||||
await expect(page).toHaveURL(/\/admin\/setup/, { timeout: 15000 });
|
||||
await page.getByRole('link', { name: "I'm already set up, just bring me to the homepage" }).click();
|
||||
await expect(page.getByRole('navigation')).toContainText(name);
|
||||
await expect(page.getByRole('link', { name: 'Settings' })).toBeVisible();
|
||||
|
|
|
@ -24,7 +24,7 @@ export default defineConfig({
|
|||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
// baseURL: 'http://127.0.0.1:3000',
|
||||
baseURL: 'http://localhost:9000',
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
"@playwright/test@^1.40.1":
|
||||
version "1.47.2"
|
||||
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.47.2.tgz#dbe7051336bfc5cc599954214f9111181dbc7475"
|
||||
resolved "https://registry.npmjs.org/@playwright/test/-/test-1.47.2.tgz"
|
||||
integrity sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==
|
||||
dependencies:
|
||||
playwright "1.47.2"
|
||||
|
||||
"@types/node@^20.10.4":
|
||||
version "20.16.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.5.tgz#d43c7f973b32ffdf9aa7bd4f80e1072310fd7a53"
|
||||
integrity sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==
|
||||
"@types/node@^22.13.10":
|
||||
version "22.13.10"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4"
|
||||
integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==
|
||||
dependencies:
|
||||
undici-types "~6.19.2"
|
||||
undici-types "~6.20.0"
|
||||
|
||||
fsevents@2.3.2:
|
||||
version "2.3.2"
|
||||
|
@ -23,19 +23,19 @@ fsevents@2.3.2:
|
|||
|
||||
playwright-core@1.47.2:
|
||||
version "1.47.2"
|
||||
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.47.2.tgz#7858da9377fa32a08be46ba47d7523dbd9460a4e"
|
||||
resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.2.tgz"
|
||||
integrity sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==
|
||||
|
||||
playwright@1.47.2:
|
||||
version "1.47.2"
|
||||
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.47.2.tgz#155688aa06491ee21fb3e7555b748b525f86eb20"
|
||||
resolved "https://registry.npmjs.org/playwright/-/playwright-1.47.2.tgz"
|
||||
integrity sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==
|
||||
dependencies:
|
||||
playwright-core "1.47.2"
|
||||
optionalDependencies:
|
||||
fsevents "2.3.2"
|
||||
|
||||
undici-types@~6.19.2:
|
||||
version "6.19.8"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
|
||||
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
|
||||
undici-types@~6.20.0:
|
||||
version "6.20.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
|
||||
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue