Skip to content

Commit 4ad8f7c

Browse files
gkorlandCopilot
andcommitted
fix(ci): address PR review comments on E2E test split
- Remove @requires-ai tag from 'empty query submission is prevented' test since it only validates UI state (send button disabled) without needing a database connection or AI embeddings - Check all three Azure secrets (API_KEY, API_BASE, API_VERSION) in the secrets detection step, not just the API key fail, preserving test signal for both shards - Update AGENTS.md to mention fork PRs alongside Dependabot as contexts where secrets are unavailable Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 73609f3 commit 4ad8f7c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/playwright.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Check for AI secrets
3030
id: check-secrets
3131
run: |
32-
if [ -n "$AZURE_API_KEY" ]; then
32+
if [ -n "$AZURE_API_KEY" ] && [ -n "$AZURE_API_BASE" ] && [ -n "$AZURE_API_VERSION" ]; then
3333
echo "has-ai-secrets=true" >> "$GITHUB_OUTPUT"
3434
echo "AI secrets are available — full E2E suite will run"
3535
else
@@ -38,6 +38,8 @@ jobs:
3838
fi
3939
env:
4040
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }}
41+
AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }}
42+
AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }}
4143

4244
# Setup Python
4345
- name: Set up Python
@@ -191,8 +193,9 @@ jobs:
191193
CI: true
192194

193195
# Run AI-dependent Playwright tests (only when secrets are available)
196+
# Use !cancelled() so AI tests still run even if non-AI tests fail
194197
- name: Run Playwright tests (AI)
195-
if: steps.check-secrets.outputs.has-ai-secrets == 'true'
198+
if: "!cancelled() && steps.check-secrets.outputs.has-ai-secrets == 'true'"
196199
run: npx playwright test --grep @requires-ai --reporter=list
197200
env:
198201
CI: true

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ See `.env.example` for the full list.
136136

137137
GitHub Actions workflows (`.github/workflows/`):
138138
- **tests.yml** — unit tests + lint on push/PR to main/staging
139-
- **playwright.yml** — dedicated Playwright E2E suite; non-AI tests always run, `@requires-ai` tests only when LLM secrets are available
139+
- **playwright.yml** — dedicated Playwright E2E suite; non-AI tests always run, `@requires-ai` tests only when LLM secrets are available (secrets are unavailable for Dependabot and fork PRs)
140140
- **pylint.yml** — Python linting
141141
- **spellcheck.yml** — docs spellcheck
142142
- **publish-docker.yml** — build & push Docker image to DockerHub

e2e/tests/chat.spec.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,11 @@ test.describe('Chat Feature Tests', () => {
141141
expect(resultsVisible).toBeTruthy();
142142
});
143143

144-
test('empty query submission is prevented', { tag: '@requires-ai' }, async () => {
144+
test('empty query submission is prevented', async () => {
145145
const homePage = await browser.createNewPage(HomePage, getBaseUrl(), 'e2e/.auth/user.json');
146146
await browser.setPageToFullScreen();
147147

148-
// Ensure database is connected (will skip if already connected)
149-
await homePage.ensureDatabaseConnected(apiCall);
150-
151-
// Verify send button is disabled with empty input
148+
// Verify send button is disabled with empty input (pure UI validation, no DB needed)
152149
const isSendButtonDisabled = await homePage.isSendQueryButtonDisabled();
153150
expect(isSendButtonDisabled).toBeTruthy();
154151
});

0 commit comments

Comments
 (0)