test: Update test descriptions to indicate requirement for store API key (#5359)

* test: update test descriptions to indicate requirement for store API key

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-12-19 13:37:28 -03:00 committed by GitHub
commit be612eb6d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 76 additions and 72 deletions

View file

@ -3,7 +3,7 @@ import * as dotenv from "dotenv";
import path from "path";
test(
"should delete a component",
"should delete a component (requires store API key)",
{ tag: ["@release", "@api"] },
async ({ page }) => {
test.skip(

View file

@ -3,7 +3,7 @@ import * as dotenv from "dotenv";
import path from "path";
test(
"should delete a flow",
"should delete a flow (requires store API key)",
{ tag: ["@release", "@api"] },
async ({ page }) => {
test.skip(

View file

@ -4,7 +4,7 @@ import path from "path";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
test.skip(
"should like and add components and flows",
"should like and add components and flows (requires store API key)",
{ tag: ["@release"] },
async ({ page }) => {
test.skip(
@ -84,7 +84,7 @@ test.skip(
);
test.skip(
"should find a searched Component on Store",
"should find a searched Component on Store (requires store API key)",
{ tag: ["@release"] },
async ({ page }) => {
test.skip(

View file

@ -3,7 +3,7 @@ import * as dotenv from "dotenv";
import path from "path";
test(
"should order the visualization",
"should order the visualization (requires store API key)",
{ tag: ["@release"] },
async ({ page }) => {
test.skip(
@ -50,69 +50,73 @@ test(
},
);
test("should filter by type", { tag: ["@release"] }, async ({ page }) => {
test.skip(
!process?.env?.STORE_API_KEY,
"STORE_API_KEY required to run this test",
);
if (!process.env.CI) {
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
}
await page.goto("/");
await page.getByTestId("button-store").click();
await page.getByTestId("api-key-button-store").click({
timeout: 200000,
});
test(
"should filter by type (requires store API key)",
{ tag: ["@release"] },
async ({ page }) => {
test.skip(
!process?.env?.STORE_API_KEY,
"STORE_API_KEY required to run this test",
);
if (!process.env.CI) {
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
}
await page.goto("/");
await page.getByTestId("button-store").click();
await page.getByTestId("api-key-button-store").click({
timeout: 200000,
});
await page
.getByPlaceholder("Insert your API Key")
.fill(process.env.STORE_API_KEY ?? "");
await page.getByTestId("api-key-save-button-store").click();
await expect(page.getByText("API key saved successfully")).toBeVisible({
timeout: 5000,
});
await page.getByTestId("button-store").click();
await page.waitForSelector('[data-testid="likes-Website Content QA"]', {
timeout: 100000,
});
await page.getByText("Website Content QA").isVisible();
await page.waitForSelector('[data-testid="flows-button-store"]', {
timeout: 100000,
});
await page.getByTestId("flows-button-store").click();
await page.waitForSelector('[data-testid="icon-Group"]', {
timeout: 100000,
});
let iconGroup = await page.getByTestId("icon-Group")?.count();
expect(iconGroup).not.toBe(0);
await page.getByText("icon-ToyBrick").last().isHidden();
await page.waitForSelector('[data-testid="components-button-store"]', {
timeout: 100000,
});
await page.getByTestId("components-button-store").click();
await expect(page.getByTestId("icon-Group").last()).toBeHidden({
timeout: 30000,
});
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
timeout: 100000,
});
let toyBrick = await page.getByTestId("icon-ToyBrick")?.count();
expect(toyBrick).not.toBe(0);
await page.waitForSelector('[data-testid="all-button-store"]', {
timeout: 100000,
});
await page.getByTestId("all-button-store").click();
await page.waitForSelector('[data-testid="icon-Group"]', {
timeout: 100000,
});
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
timeout: 100000,
});
let iconGroupAllCount = await page.getByTestId("icon-Group")?.count();
await page.waitForTimeout(500);
let toyBrickAllCount = await page.getByTestId("icon-ToyBrick")?.count();
await page.waitForTimeout(500);
if (iconGroupAllCount === 0 || toyBrickAllCount === 0) {
expect(false).toBe(true);
}
});
await page
.getByPlaceholder("Insert your API Key")
.fill(process.env.STORE_API_KEY ?? "");
await page.getByTestId("api-key-save-button-store").click();
await expect(page.getByText("API key saved successfully")).toBeVisible({
timeout: 5000,
});
await page.getByTestId("button-store").click();
await page.waitForSelector('[data-testid="likes-Website Content QA"]', {
timeout: 100000,
});
await page.getByText("Website Content QA").isVisible();
await page.waitForSelector('[data-testid="flows-button-store"]', {
timeout: 100000,
});
await page.getByTestId("flows-button-store").click();
await page.waitForSelector('[data-testid="icon-Group"]', {
timeout: 100000,
});
let iconGroup = await page.getByTestId("icon-Group")?.count();
expect(iconGroup).not.toBe(0);
await page.getByText("icon-ToyBrick").last().isHidden();
await page.waitForSelector('[data-testid="components-button-store"]', {
timeout: 100000,
});
await page.getByTestId("components-button-store").click();
await expect(page.getByTestId("icon-Group").last()).toBeHidden({
timeout: 30000,
});
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
timeout: 100000,
});
let toyBrick = await page.getByTestId("icon-ToyBrick")?.count();
expect(toyBrick).not.toBe(0);
await page.waitForSelector('[data-testid="all-button-store"]', {
timeout: 100000,
});
await page.getByTestId("all-button-store").click();
await page.waitForSelector('[data-testid="icon-Group"]', {
timeout: 100000,
});
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
timeout: 100000,
});
let iconGroupAllCount = await page.getByTestId("icon-Group")?.count();
await page.waitForTimeout(500);
let toyBrickAllCount = await page.getByTestId("icon-ToyBrick")?.count();
await page.waitForTimeout(500);
if (iconGroupAllCount === 0 || toyBrickAllCount === 0) {
expect(false).toBe(true);
}
},
);

View file

@ -4,8 +4,8 @@ import path from "path";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
test(
"should be able to share a component on the store by clicking on the share button on the canvas",
{ tag: ["@release"] },
"should be able to share a component on the store by clicking on the share button on the canvas (requires store API key)",
{ tag: ["@release", "@api"] },
async ({ page }) => {
test.skip(
!process?.env?.STORE_API_KEY,