import { test, expect } from '@playwright/test';

/**
 * Full operator flow against a live gateway (SMTP → DLT → MSG91 → send).
 * Opt-in: set E2E_FULL=1 and run gateway on :8081 with ADMIN_PASSWORD.
 */
const full = process.env.E2E_FULL === '1';

test.describe('operator setup flow (live gateway)', () => {
  test.skip(!full, 'Set E2E_FULL=1 with gateway on :8081 to run');

  test('Channels → Templates → Apps → Messages are reachable', async ({ page }) => {
    await page.goto('/channels');
    await expect(page.getByRole('heading', { name: /Channels|Providers/i })).toBeVisible();

    await page.goto('/templates');
    await expect(page.getByRole('heading', { name: /Templates/i })).toBeVisible();

    await page.goto('/apps');
    await expect(page.getByRole('heading', { name: /Apps/i })).toBeVisible();

    await page.goto('/messages');
    await expect(page.getByRole('heading', { name: /Messages/i })).toBeVisible();
  });
});
