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>
76 lines
1.9 KiB
TypeScript
76 lines
1.9 KiB
TypeScript
import { type Locator, type Page, expect } from '@playwright/test'
|
|
|
|
/**
|
|
* Page Object for the authenticated home page (/).
|
|
*
|
|
* When logged in, the home page shows:
|
|
* - Navigation bar with Gitgram logo
|
|
* - CreatePost composer
|
|
* - Feed with posts
|
|
*/
|
|
export class HomePage {
|
|
readonly page: Page
|
|
|
|
// Navigation
|
|
readonly navbar: Locator
|
|
readonly logo: Locator
|
|
readonly searchInput: Locator
|
|
|
|
// CreatePost composer
|
|
readonly postTextarea: Locator
|
|
readonly postButton: Locator
|
|
|
|
// Feed
|
|
readonly feedContainer: Locator
|
|
|
|
constructor(page: Page) {
|
|
this.page = page
|
|
|
|
this.navbar = page.locator('nav')
|
|
this.logo = page.getByRole('link', { name: 'Gitgram' }).first()
|
|
this.searchInput = page.getByPlaceholder('Search or paste GitHub URL...')
|
|
|
|
// CreatePost textarea
|
|
this.postTextarea = page.getByPlaceholder(
|
|
'Share your code, progress, or thoughts...',
|
|
)
|
|
|
|
// Post submit button in the composer
|
|
this.postButton = page
|
|
.locator('.bg-surface, [class*="bg-surface"]')
|
|
.getByRole('button', { name: 'Post' })
|
|
|
|
// The feed is a series of post cards
|
|
this.feedContainer = page.locator('.space-y-6').first()
|
|
}
|
|
|
|
async goto() {
|
|
await this.page.goto('/')
|
|
}
|
|
|
|
/** Check that the authenticated home page is displayed */
|
|
async expectAuthenticated() {
|
|
await expect(this.navbar).toBeVisible()
|
|
await expect(this.postTextarea).toBeVisible()
|
|
}
|
|
|
|
/** Create a new post from the home page composer */
|
|
async createPost(content: string) {
|
|
await this.postTextarea.fill(content)
|
|
await this.postButton.click()
|
|
}
|
|
|
|
/** Search using the navigation search bar */
|
|
async search(query: string) {
|
|
await this.searchInput.fill(query)
|
|
await this.searchInput.press('Enter')
|
|
}
|
|
|
|
/** Get all visible post cards in the feed */
|
|
getPostCards() {
|
|
return this.page.locator(
|
|
'.bg-white.dark\\:bg-gray-800.rounded-lg, [class*="bg-card"][class*="rounded-lg"]',
|
|
)
|
|
}
|
|
}
|