diff --git a/tests/playwright/e2e/core/header-contacts-menu.spec.ts b/tests/playwright/e2e/core/header-contacts-menu.spec.ts index 04eedcb9492..f11f3bc2d25 100644 --- a/tests/playwright/e2e/core/header-contacts-menu.spec.ts +++ b/tests/playwright/e2e/core/header-contacts-menu.spec.ts @@ -94,7 +94,6 @@ test.describe('Header: Contacts menu', () => { test('users from other groups are not seen when user enumeration is restricted to the same group', async ({ page, contactUser }) => { // Enable restriction first, then open the menu. await runOcc(['config:app:set', '--value', 'yes', 'core', 'shareapi_restrict_user_enumeration_to_group']) - await new Promise((resolve) => globalThis.setTimeout(resolve, 3000)) // wait for app config cache to expire try { await page.goto('/') const contactsMenu = new ContactsMenuPage(page) @@ -106,9 +105,7 @@ test.describe('Header: Contacts menu', () => { // Close, lift the restriction, reopen — the contact should reappear. await runOcc(['config:app:set', '--value', 'no', 'core', 'shareapi_restrict_user_enumeration_to_group']) - const waitForAppConfigCacheTTL = new Promise((resolve) => globalThis.setTimeout(resolve, 3000)) // wait for app config cache to expire await contactsMenu.close() - await waitForAppConfigCacheTTL await page.reload() await contactsMenu.open() diff --git a/tests/playwright/start-nextcloud-server.js b/tests/playwright/start-nextcloud-server.js index ac81788f692..bf4c9d54ea3 100644 --- a/tests/playwright/start-nextcloud-server.js +++ b/tests/playwright/start-nextcloud-server.js @@ -49,13 +49,19 @@ async function start() { await configureNextcloud() process.stdout.write('\nApply custom configuration for Playwright tests\n') + await runExec(['php', '-r', '$db = new SQLite3("data/owncloud.db");$db->busyTimeout(5000);$db->exec("PRAGMA journal_mode = wal;");']) + process.stdout.write('├─ Enabled SQLite WAL mode for better performance\n') + + await runOcc(['config:system:set', 'cache_app_config', '--value', 'false', '--type', 'boolean']) + process.stdout.write('├─ Disabled caching AppConfig\n') // otherwise test setup using OCC will need to wait 3s so that web cache TTL expires + await runOcc(['config:system:set', 'appstoreenabled', '--value', 'false', '--type', 'boolean']) process.stdout.write('├─ Disabled app store\n') + // createRandomUser() generates short passwords that the policy would reject await runOcc(['app:disable', 'password_policy']) process.stdout.write('├─ Disabled password policy for random test users\n') - await runExec(['php', '-r', '$db = new SQLite3("data/owncloud.db");$db->busyTimeout(5000);$db->exec("PRAGMA journal_mode = wal;");']) - process.stdout.write('├─ Enabled SQLite WAL mode for better performance\n') + process.stdout.write('├─ Initialize cron job...\n') await runExec(['php', 'cron.php']) process.stdout.write('│ └─ OK !\n')