Files
3cda68c5c7 E2E/Playwright: Add testcontainers to playwright-lib (#37570)
* add testcontainers to playwright-lib

* include retry mechanism for transient failures

* - Introduced a new command `testcontainers:up` in package.json to run Playwright tests with Testcontainers.
- Created a standalone Playwright configuration file `playwright.testcontainers-up.config.ts` for managing Testcontainers.
- Added a no-op test `testcontainers_up.spec.ts` to ensure the Testcontainers stack is up during the test run.
- Implemented a global setup script `testcontainers_up_global_setup.ts` to start and stop the Testcontainers stack.
- Updated dependencies in package.json, including adding `chalk` for logging.

* fix package-lock

* fix tsc and restore waiting for all migrations to complete

---------

Co-authored-by: Mattermost Build <[email protected]>
2026-07-28 10:06:36 +02:00

23 lines
877 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {expect, test} from '@mattermost/playwright-lib';
/**
* @objective Verify a FeatureFlags entry can be switched via a server restart, since FeatureFlags
* are never re-read from a running server's config store and only take effect through a boot-time
* MM_FEATUREFLAGS_* env var.
*
* @precondition
* Full (Testcontainers) mode, so the server can be restarted with a different feature flag env var.
*/
test('flips a feature flag by restarting the server with it set', async ({pw}) => {
// Ensure prerequisites
await pw.ensureFeatureFlag('TestBoolFeature', true);
const {adminClient} = await pw.getAdminClient();
const config = await adminClient.getConfig();
expect(String(config.FeatureFlags?.TestBoolFeature)).toBe('true');
});