Skip to content

Commit 7f9a1a7

Browse files
Merge branch 'main' into fix/mcp-debug-log-cwd-pollution
2 parents d25f943 + 80a5d3d commit 7f9a1a7

37 files changed

+891
-254
lines changed

firebase-vscode/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## NEXT
22

3+
## 2.2.0
4+
5+
- Update internal `firebase-tools` dependency to 15.9.0
6+
37
## 2.1.2
48

59
- Update internal `firebase-tools` dependency to 15.7.0

firebase-vscode/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

firebase-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"publisher": "GoogleCloudTools",
55
"icon": "./resources/firebase_dataconnect_logo.png",
66
"description": "Firebase Data Connect for VSCode",
7-
"version": "2.1.2",
7+
"version": "2.2.0",
88
"engines": {
99
"vscode": "^1.69.0"
1010
},

npm-shrinkwrap.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firebase-tools",
3-
"version": "15.8.0",
3+
"version": "15.9.0",
44
"description": "Command-Line Interface for Firebase",
55
"main": "./lib/index.js",
66
"mcpName": "io.github.firebase/firebase-mcp",

src/appdistribution/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { appDistributionOrigin } from "../api";
99

1010
import {
1111
AabInfo,
12-
AIInstruction,
12+
AiInstructions,
1313
BatchRemoveTestersResponse,
1414
BatchUpdateTestCasesRequest,
1515
BatchUpdateTestCasesResponse,
@@ -276,7 +276,7 @@ export class AppDistributionClient {
276276
async createReleaseTest(
277277
releaseName: string,
278278
devices: TestDevice[],
279-
aiInstruction?: AIInstruction,
279+
aiInstructions?: AiInstructions,
280280
loginCredential?: LoginCredential,
281281
testCaseName?: string,
282282
displayName?: string,
@@ -289,7 +289,7 @@ export class AppDistributionClient {
289289
deviceExecutions: devices.map((device) => ({ device })),
290290
loginCredential,
291291
testCase: testCaseName,
292-
aiInstructions: aiInstruction,
292+
aiInstructions: aiInstructions,
293293
displayName: displayName,
294294
},
295295
});

src/appdistribution/types.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,10 @@ export interface ReleaseTest {
116116
deviceExecutions: DeviceExecution[];
117117
loginCredential?: LoginCredential;
118118
testCase?: string;
119-
aiInstructions?: AIInstruction;
119+
aiInstructions?: AiInstructions;
120120
displayName?: string;
121121
}
122122

123-
export interface AIInstruction {
124-
steps: AIStep[];
125-
}
126-
127-
export interface AIStep {
128-
goal: string;
129-
hint?: string;
130-
successCriteria?: string;
131-
}
132-
133123
export interface AiStep {
134124
goal: string;
135125
hint?: string;

src/appdistribution/yaml_helper.spec.ts

Lines changed: 79 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const TEST_CASES: TestCase[] = [
1616
{
1717
goal: "test-goal",
1818
hint: "test-hint",
19-
successCriteria: "test-success-criteria",
19+
successCriteria: "test-final-screen-assertion",
2020
},
2121
],
2222
},
@@ -28,38 +28,41 @@ const TEST_CASES: TestCase[] = [
2828
},
2929
];
3030

31-
const YAML_STRING = `- displayName: test-display-name
32-
id: test-case-id
33-
prerequisiteTestCaseId: prerequisite-test-case-id
34-
steps:
35-
- goal: test-goal
36-
hint: test-hint
37-
successCriteria: test-success-criteria
38-
- displayName: minimal-case
39-
id: minimal-id
40-
steps:
41-
- goal: win
31+
const YAML_STRING = `tests:
32+
- displayName: test-display-name
33+
id: test-case-id
34+
prerequisiteTestCaseId: prerequisite-test-case-id
35+
steps:
36+
- goal: test-goal
37+
hint: test-hint
38+
finalScreenAssertion: test-final-screen-assertion
39+
- displayName: minimal-case
40+
id: minimal-id
41+
steps:
42+
- goal: win
4243
`;
4344

44-
const YAML_DATA = [
45-
{
46-
displayName: "test-display-name",
47-
id: "test-case-id",
48-
prerequisiteTestCaseId: "prerequisite-test-case-id",
49-
steps: [
50-
{
51-
goal: "test-goal",
52-
hint: "test-hint",
53-
successCriteria: "test-success-criteria",
54-
},
55-
],
56-
},
57-
{
58-
displayName: "minimal-case",
59-
id: "minimal-id",
60-
steps: [{ goal: "win" }],
61-
},
62-
];
45+
const YAML_DATA = {
46+
tests: [
47+
{
48+
displayName: "test-display-name",
49+
id: "test-case-id",
50+
prerequisiteTestCaseId: "prerequisite-test-case-id",
51+
steps: [
52+
{
53+
goal: "test-goal",
54+
hint: "test-hint",
55+
finalScreenAssertion: "test-final-screen-assertion",
56+
},
57+
],
58+
},
59+
{
60+
displayName: "minimal-case",
61+
id: "minimal-id",
62+
steps: [{ goal: "win" }],
63+
},
64+
],
65+
};
6366

6467
describe("YamlHelper", () => {
6568
it("converts TestCase[] to YAML string", () => {
@@ -76,9 +79,10 @@ describe("YamlHelper", () => {
7679
it("converts YAML without ID", () => {
7780
const testCases = fromYaml(
7881
APP_NAME,
79-
`- displayName: minimal-case
80-
steps:
81-
- goal: win
82+
`tests:
83+
- displayName: minimal-case
84+
steps:
85+
- goal: win
8286
`,
8387
);
8488
expect(testCases).to.eql([
@@ -93,29 +97,35 @@ describe("YamlHelper", () => {
9397
expect(() =>
9498
fromYaml(
9599
APP_NAME,
96-
`- steps:
97-
- goal: test-goal
98-
hint: test-hint
99-
successCriteria: test-success-criteria
100+
`tests:
101+
- steps:
102+
- goal: test-goal
103+
hint: test-hint
104+
finalScreenAssertion: test-final-screen-assertion
100105
`,
101106
),
102107
).to.throw(/"displayName" is required/);
103108
});
104109

105110
it("throws error if steps is missing", () => {
106-
expect(() => fromYaml(APP_NAME, `- displayName: test-display-name`)).to.throw(
107-
/"steps" is required/,
108-
);
111+
expect(() =>
112+
fromYaml(
113+
APP_NAME,
114+
`tests:
115+
- displayName: test-display-name`,
116+
),
117+
).to.throw(/"steps" is required/);
109118
});
110119

111120
it("throws error if goal is missing", () => {
112121
expect(() =>
113122
fromYaml(
114123
APP_NAME,
115-
`- displayName: test-display-name
116-
steps:
117-
- hint: test-hint
118-
successCriteria: test-success-criteria
124+
`tests:
125+
- displayName: test-display-name
126+
steps:
127+
- hint: test-hint
128+
finalScreenAssertion: test-final-screen-assertion
119129
`,
120130
),
121131
).to.throw(/"goal" is required/);
@@ -125,10 +135,11 @@ describe("YamlHelper", () => {
125135
expect(() =>
126136
fromYaml(
127137
APP_NAME,
128-
`- displayName: test-display-name
129-
extraTestCaseProperty: property
130-
steps:
131-
- goal: test-goal
138+
`tests:
139+
- displayName: test-display-name
140+
extraTestCaseProperty: property
141+
steps:
142+
- goal: test-goal
132143
`,
133144
),
134145
).to.throw(/unexpected property "extraTestCaseProperty"/);
@@ -138,10 +149,11 @@ describe("YamlHelper", () => {
138149
expect(() =>
139150
fromYaml(
140151
APP_NAME,
141-
`- displayName: test-display-name
142-
steps:
143-
- goal: test-goal
144-
extraStepProperty: property
152+
`tests:
153+
- displayName: test-display-name
154+
steps:
155+
- goal: test-goal
156+
extraStepProperty: property
145157
`,
146158
),
147159
).to.throw(/unexpected property "extraStepProperty"/);
@@ -151,13 +163,22 @@ describe("YamlHelper", () => {
151163
expect(() =>
152164
fromYaml(
153165
APP_NAME,
154-
`-
155-
this is not valid YAML`,
166+
`tests:
167+
-
168+
invalid key: value`,
156169
),
157-
).to.throw(/at line 2/);
170+
).to.throw(/at line 3/);
171+
});
172+
173+
it("throws error if YAML doesn't contain a top-level tests field", () => {
174+
expect(() => fromYaml(APP_NAME, "not a list")).to.throw(
175+
/YAML file must contain a top-level 'tests' field with a list of test cases/,
176+
);
158177
});
159178

160-
it("throws error if YAML doesn't contain a top-level array", () => {
161-
expect(() => fromYaml(APP_NAME, "not a list")).to.throw(/must contain a list of test cases/);
179+
it("throws error if top-level 'tests' field is not an array", () => {
180+
expect(() => fromYaml(APP_NAME, `tests: "not an array"`)).to.throw(
181+
/The 'tests' field in the YAML file must contain a list of test cases/,
182+
);
162183
});
163184
});

0 commit comments

Comments
 (0)