Skip to content

Commit f72a64b

Browse files
committed
actually await things now
1 parent ab3a113 commit f72a64b

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

typescript-sdk/apps/dojo/e2e/featurePages/SharedStatePage.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ export class SharedStatePage {
4747
]);
4848
}
4949

50-
async getIngredientCard(name) {
51-
return this.page.locator(`.ingredient-card:has(input.ingredient-name-input[value="${name}"])`);
50+
async awaitIngredientCard(name: string | RegExp) {
51+
return this.page.locator(`.ingredient-card:has(input.ingredient-name-input[value="${name.toString}"])`);
5252
}
5353

54-
async addNewIngredient(placeholderText) {
54+
async addNewIngredient(placeholderText: string) {
5555
this.addIngredient.click();
5656
this.page.locator(`input[placeholder="${placeholderText}"]`);
5757
}
5858

59-
async getInstructionItems(containerLocator) {
59+
async getInstructionItems(containerLocator: Locator ) {
6060
const count = await containerLocator.locator('.instruction-item').count();
6161
if (count <= 0) {
6262
throw new Error('No instruction items found in the container.');

typescript-sdk/apps/dojo/e2e/tests/crewAITests/sharedStatePage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);

typescript-sdk/apps/dojo/e2e/tests/langgraphFastAPITests/sharedStatePage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);

typescript-sdk/apps/dojo/e2e/tests/langgraphTests/sharedStatePage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);

typescript-sdk/apps/dojo/e2e/tests/llamaIndexTests/sharedStatePage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);

typescript-sdk/apps/dojo/e2e/tests/mastraAgentLocalTests/sharedStatePage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);

typescript-sdk/apps/dojo/e2e/tests/pydanticAITests/sharedStatePage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);

typescript-sdk/apps/dojo/e2e/tests/serverStarterAllFeaturesTests/sharedStatePage.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ test.describe("Shared State Feature", () => {
1515
await sharedStateAgent.openChat();
1616
await sharedStateAgent.sendMessage("give me recipe for pasta");
1717
await sharedStateAgent.loader();
18-
await sharedStateAgent.getIngredientCard(/Pasta/);
18+
await sharedStateAgent.awaitIngredientCard(/Pasta/);
1919
await sharedStateAgent.getInstructionItems(
2020
sharedStateAgent.instructionsContainer
2121
);
2222
});
2323

2424
// Fails. Issue with the test, most likely
25-
test.fixme("[Server Starter all features] should share state between UI and chat", async ({
25+
test("[Server Starter all features] should share state between UI and chat", async ({
2626
page,
2727
}) => {
2828
const sharedStateAgent = new SharedStatePage(page);

0 commit comments

Comments
 (0)