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:
parent
a30ccc4302
commit
be612eb6d3
5 changed files with 76 additions and 72 deletions
|
|
@ -3,7 +3,7 @@ import * as dotenv from "dotenv";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"should delete a component",
|
"should delete a component (requires store API key)",
|
||||||
{ tag: ["@release", "@api"] },
|
{ tag: ["@release", "@api"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(
|
test.skip(
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import * as dotenv from "dotenv";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"should delete a flow",
|
"should delete a flow (requires store API key)",
|
||||||
{ tag: ["@release", "@api"] },
|
{ tag: ["@release", "@api"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(
|
test.skip(
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import path from "path";
|
||||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||||
|
|
||||||
test.skip(
|
test.skip(
|
||||||
"should like and add components and flows",
|
"should like and add components and flows (requires store API key)",
|
||||||
{ tag: ["@release"] },
|
{ tag: ["@release"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(
|
test.skip(
|
||||||
|
|
@ -84,7 +84,7 @@ test.skip(
|
||||||
);
|
);
|
||||||
|
|
||||||
test.skip(
|
test.skip(
|
||||||
"should find a searched Component on Store",
|
"should find a searched Component on Store (requires store API key)",
|
||||||
{ tag: ["@release"] },
|
{ tag: ["@release"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(
|
test.skip(
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import * as dotenv from "dotenv";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"should order the visualization",
|
"should order the visualization (requires store API key)",
|
||||||
{ tag: ["@release"] },
|
{ tag: ["@release"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(
|
test.skip(
|
||||||
|
|
@ -50,69 +50,73 @@ test(
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
test("should filter by type", { tag: ["@release"] }, async ({ page }) => {
|
test(
|
||||||
test.skip(
|
"should filter by type (requires store API key)",
|
||||||
!process?.env?.STORE_API_KEY,
|
{ tag: ["@release"] },
|
||||||
"STORE_API_KEY required to run this test",
|
async ({ page }) => {
|
||||||
);
|
test.skip(
|
||||||
if (!process.env.CI) {
|
!process?.env?.STORE_API_KEY,
|
||||||
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
"STORE_API_KEY required to run this test",
|
||||||
}
|
);
|
||||||
await page.goto("/");
|
if (!process.env.CI) {
|
||||||
await page.getByTestId("button-store").click();
|
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
||||||
await page.getByTestId("api-key-button-store").click({
|
}
|
||||||
timeout: 200000,
|
await page.goto("/");
|
||||||
});
|
await page.getByTestId("button-store").click();
|
||||||
|
await page.getByTestId("api-key-button-store").click({
|
||||||
|
timeout: 200000,
|
||||||
|
});
|
||||||
|
|
||||||
await page
|
await page
|
||||||
.getByPlaceholder("Insert your API Key")
|
.getByPlaceholder("Insert your API Key")
|
||||||
.fill(process.env.STORE_API_KEY ?? "");
|
.fill(process.env.STORE_API_KEY ?? "");
|
||||||
await page.getByTestId("api-key-save-button-store").click();
|
await page.getByTestId("api-key-save-button-store").click();
|
||||||
await expect(page.getByText("API key saved successfully")).toBeVisible({
|
await expect(page.getByText("API key saved successfully")).toBeVisible({
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("button-store").click();
|
await page.getByTestId("button-store").click();
|
||||||
await page.waitForSelector('[data-testid="likes-Website Content QA"]', {
|
await page.waitForSelector('[data-testid="likes-Website Content QA"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByText("Website Content QA").isVisible();
|
await page.getByText("Website Content QA").isVisible();
|
||||||
await page.waitForSelector('[data-testid="flows-button-store"]', {
|
await page.waitForSelector('[data-testid="flows-button-store"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("flows-button-store").click();
|
await page.getByTestId("flows-button-store").click();
|
||||||
await page.waitForSelector('[data-testid="icon-Group"]', {
|
await page.waitForSelector('[data-testid="icon-Group"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
let iconGroup = await page.getByTestId("icon-Group")?.count();
|
let iconGroup = await page.getByTestId("icon-Group")?.count();
|
||||||
expect(iconGroup).not.toBe(0);
|
expect(iconGroup).not.toBe(0);
|
||||||
await page.getByText("icon-ToyBrick").last().isHidden();
|
await page.getByText("icon-ToyBrick").last().isHidden();
|
||||||
await page.waitForSelector('[data-testid="components-button-store"]', {
|
await page.waitForSelector('[data-testid="components-button-store"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("components-button-store").click();
|
await page.getByTestId("components-button-store").click();
|
||||||
await expect(page.getByTestId("icon-Group").last()).toBeHidden({
|
await expect(page.getByTestId("icon-Group").last()).toBeHidden({
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
});
|
});
|
||||||
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
let toyBrick = await page.getByTestId("icon-ToyBrick")?.count();
|
let toyBrick = await page.getByTestId("icon-ToyBrick")?.count();
|
||||||
expect(toyBrick).not.toBe(0);
|
expect(toyBrick).not.toBe(0);
|
||||||
await page.waitForSelector('[data-testid="all-button-store"]', {
|
await page.waitForSelector('[data-testid="all-button-store"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.getByTestId("all-button-store").click();
|
await page.getByTestId("all-button-store").click();
|
||||||
await page.waitForSelector('[data-testid="icon-Group"]', {
|
await page.waitForSelector('[data-testid="icon-Group"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
await page.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
});
|
});
|
||||||
let iconGroupAllCount = await page.getByTestId("icon-Group")?.count();
|
let iconGroupAllCount = await page.getByTestId("icon-Group")?.count();
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(500);
|
||||||
let toyBrickAllCount = await page.getByTestId("icon-ToyBrick")?.count();
|
let toyBrickAllCount = await page.getByTestId("icon-ToyBrick")?.count();
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(500);
|
||||||
if (iconGroupAllCount === 0 || toyBrickAllCount === 0) {
|
if (iconGroupAllCount === 0 || toyBrickAllCount === 0) {
|
||||||
expect(false).toBe(true);
|
expect(false).toBe(true);
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import path from "path";
|
||||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"should be able to share a component on the store by clicking on the share button on the canvas",
|
"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"] },
|
{ tag: ["@release", "@api"] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(
|
test.skip(
|
||||||
!process?.env?.STORE_API_KEY,
|
!process?.env?.STORE_API_KEY,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue