This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
gitgram-ai/gitgram/web/e2e/pages/search.page.ts
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

75 lines
1.8 KiB
TypeScript

import { type Locator, type Page, expect } from '@playwright/test'
/**
* Page Object for the search page (/search).
*
* Features a search input, tabs (repos, people, posts, hashtags),
* advanced filters, and result lists.
*/
export class SearchPage {
readonly page: Page
// Search input (the main search field on /search)
readonly searchInput: Locator
// Tabs
readonly reposTab: Locator
readonly peopleTab: Locator
readonly postsTab: Locator
readonly hashtagsTab: Locator
// Filter toggle
readonly filterToggle: Locator
// Results container
readonly resultsArea: Locator
constructor(page: Page) {
this.page = page
// The search page has its own input distinct from the navbar search
this.searchInput = page
.getByRole('textbox')
.filter({ hasText: '' })
.first()
// Tab text
this.reposTab = page.getByRole('button', { name: /repos/i }).first()
this.peopleTab = page.getByRole('button', { name: /people/i }).first()
this.postsTab = page.getByRole('button', { name: /posts/i }).first()
this.hashtagsTab = page
.getByRole('button', { name: /hashtags/i })
.first()
this.filterToggle = page.getByRole('button', { name: /filter/i }).first()
this.resultsArea = page.locator('main, [class*="max-w"]').first()
}
async goto() {
await this.page.goto('/search')
}
async search(query: string) {
await this.searchInput.fill(query)
await this.searchInput.press('Enter')
}
async switchTab(tab: 'repos' | 'people' | 'posts' | 'hashtags') {
switch (tab) {
case 'repos':
await this.reposTab.click()
break
case 'people':
await this.peopleTab.click()
break
case 'posts':
await this.postsTab.click()
break
case 'hashtags':
await this.hashtagsTab.click()
break
}
}
}