mattermost-mobile-upstream/detox/shared/demo-plugin-fixture.test.ts
yasser khan f3af9dbe99
Fix/detox hittest cluster (#10023)
fix(e2e): stabilize Detox and Maestro test suite

Restore main features, and harden the E2E harness against flaky UI, network, retry, synchronization, and classification-lock failures.

Stabilize channel creation, saved messages, bookmarks, search, deep links, keyboard dismissal, and post verification.
Bound network, transport, health-check, synchronization, and lock retries by elapsed time.
Fix iOS and Android Maestro/Detox races and flaky interaction flows.
Restore Session Attributes and deep-link fixes lost during merge.
Improve test isolation, global-setting cleanup, and Jest/TSIO reporting.
Enforce Maestro flow-header validation in local and CI checks.
2026-08-27 08:58:03 +05:30

23 lines
953 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import assert from 'node:assert/strict';
import {describe, it} from 'node:test';
import {demoPluginInstallPlan} from './demo-plugin-fixture';
describe('demoPluginInstallPlan', () => {
it('is a no-op when the plugin is already active (provisioned CI / local)', () => {
assert.equal(demoPluginInstallPlan({isActive: true, isInstalled: true}), 'noop');
});
it('enables an installed-but-inactive plugin instead of re-downloading', () => {
assert.equal(demoPluginInstallPlan({isActive: false, isInstalled: true}), 'enable');
});
it('uploads the runner fixture when the plugin is missing — never install_from_url', () => {
assert.equal(demoPluginInstallPlan({isActive: false, isInstalled: false}), 'upload-fixture');
assert.equal(demoPluginInstallPlan({}), 'upload-fixture');
});
});