Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

850 B
Raw Blame
import { paneRoute } from '@app/routes/app-route';
import { describe, expect, it } from 'vitest';
import { reviewsHostedContent } from './reviews-hosted-content';
import { reviewsTabSearchCodec } from './reviews-tab-search';

describe('Reviews PR navigation', () => {
  it('preserves the selected tab in a new split', () => {
    const tab = reviewsTabSearchCodec.serialize({ tab: 'authored' });
    const content = reviewsHostedContent(
      { type: 'pr', id: 'pr-1' },
      tab ? { reviews: tab } : undefined
    );

    expect(content).toEqual({
      type: 'component',
      id: 'reviews',
      entryMetadata: {
        search: { reviews: { tab: ['authored'] } },
        route: paneRoute(
          { id: 'view-reviews', params: {} },
          { id: 'reviews-pr', params: { foreignEntityId: 'pr-1' } }
        ),
      },
    });
  });
});