fix: Enhance Growth UI Layout and Consistency (#7768)

This commit is contained in:
Cristhian Zanforlin Lousa 2025-04-23 19:17:22 -03:00 • committed by GitHub
commit 60de34074b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 260 additions and 323 deletions

View file

@ -80,8 +80,8 @@ withEventDeliveryModes(
const output = await page.getByTestId("div-chat-message").allTextContents();
const outputText = output.join("\n");
expect(outputText.toLowerCase()).toContain("weather");
expect(outputText.toLowerCase()).toContain("budget");
expect(outputText.toLowerCase()).toContain("travel");
expect(outputText.toLowerCase()).toContain("day");
expect(outputText.toLowerCase()).toContain(randomCity.toLowerCase());
expect(outputText.toLowerCase()).toContain(randomCity2.toLowerCase());

View file

@ -37,35 +37,6 @@ withEventDeliveryModes(
await initialGPTsetup(page);
if (process?.env?.ASTRA_DB_API_ENDPOINT?.includes("astra-dev")) {
await page.getByTestId("title-Astra DB").first().click();
await page.getByTestId("code-button-modal").click();
await page.waitForSelector("text=Edit Code", {
timeout: 3000,
});
let cleanCode = await extractAndCleanCode(page);
cleanCode = cleanCode!.replace(
'"pre_delete_collection": self.pre_delete_collection or False,',
'"pre_delete_collection": self.pre_delete_collection or False,\n "environment": "dev",',
);
await page.locator("textarea").last().press(`ControlOrMeta+a`);
await page.keyboard.press("Backspace");
await page.locator("textarea").last().fill(cleanCode);
await page.locator('//*[@id="checkAndSaveBtn"]').click();
await page.waitForSelector('[data-testid="title-Astra DB"]', {
timeout: 3000,
});
await page.getByTestId("title-Astra DB").last().click();
await page.getByTestId("code-button-modal").click();
await page.waitForSelector("text=Edit Code", {
timeout: 3000,
});
await page.locator("textarea").last().press(`ControlOrMeta+a`);
await page.keyboard.press("Backspace");
await page.locator("textarea").last().fill(cleanCode);
await page.locator('//*[@id="checkAndSaveBtn"]').click();
}
await page.waitForSelector('[data-testid="title-Astra DB"]', {
timeout: 3000,
});
@ -263,7 +234,10 @@ withEventDeliveryModes(
path.join(__dirname, "../../assets/test_file.txt"),
);
await page.getByText("test_file.txt").last().isVisible();
await page.waitForTimeout(500);
await page.waitForSelector("text=file uploaded successfully", {
timeout: 10000,
});
await page.waitForTimeout(3000);
await page.getByTestId("select-files-modal-button").click();
await page.getByTestId("button_run_astra db").last().click();
await page.waitForSelector("text=built successfully", {