Skip to content

Commit

Permalink
Clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmotta committed Aug 1, 2023
1 parent f1ba885 commit c816b02
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,88 +190,4 @@ test.describe("Context Expression", () => {
120
);
});

test("add literal expression", async ({ expressionSelector }) => {
await expressionSelector.literalExpression(
expressionSelector.getBee(page).getByRole("row", { name: "ContextEntry-1 (<Undefined>) Select expression" })
);

await expect(expressionSelector.getBee(page).getByRole("cell", { name: "=" })).toBeAttached();
await expect(expressionSelector.getBee(page).getByRole("cell", { name: "=" })).toContainText("");

await expressionSelector.getBee(page).getByTestId("monaco-container").click();
await expressionSelector.getBee(page).getByTestId("monaco-container").type('"data"');
await expressionSelector
.getBee(page)
.getByRole("textbox", { name: "Editor content;Press Alt+F1 for Accessibility Options." })
.press("Enter");

await expect(expressionSelector.getBee(page).getByRole("cell", { name: "=" })).toContainText('"data"');
});

// add a context expression
test("add a context expression", async ({ expressionSelector }) => {
await expressionSelector.contextExpression(
expressionSelector.getBee(page).getByRole("row", { name: "ContextEntry-1 (<Undefined>) Select expression" })
);
const nestedContextExpression = expressionSelector
.getBee(page)
.getByRole("row", { name: "ContextEntry-1 (<Undefined>)" });

// await expect(nestedContextExpression.getByRole("cell", { name: "{} Context" })).toBeAttached();
// await expect(nestedContextExpression.getByRole("cell", { name: "ContextEntry-1 (<Undefined>)" })).toBeAttached();

// await nestedContextExpression.getByText("ContextEntry-1", { exact: true }).click();
// await expressionSelector.page.getByPlaceholder("Expression Name").press("Control+a");
// await expressionSelector.page.getByPlaceholder("Expression Name").fill("My Entry");
// await expressionSelector.page.getByRole("button", { name: "Options menu" }).click();
// await expressionSelector.page.getByRole("option", { name: "boolean" }).click();
// await expressionSelector.page.getByRole("button", { name: "Options menu" }).press("Enter");

// const newNestedContextExpression = expressionSelector
// .getBee(page)
// .getByRole("row", { name: "My Entry (boolean) Select expression", exact: true });
// await expressionSelector.selectLiteralExpression(newNestedContextExpression);

// await expressionSelector.page.getByTestId("monaco-container").click();
// await expressionSelector.page.getByTestId("monaco-container").type('"data"');
// await expressionSelector.page
// .getByRole("textbox", { name: "Editor content;Press Alt+F1 for Accessibility Options." })
// .press("Enter");

// await expect(expressionSelector.getBee(page).getByRole('cell', { name: '= "data" "data"', exact: true })).toBeAttached();
});

// // add a decision table expression
// test("add a decision table expression", async ({ expressionSelector }) => {});

// // add a relation expression
// test("add a relation expression", async ({ expressionSelector }) => {});

// // add a function expression
// test("add a function expression", async ({ expressionSelector }) => {});

// // add a invocation expression
// test("add an invocation expression", async ({ expressionSelector }) => {});

// // add a list expression
// test("add a list expression", async ({ expressionSelector }) => {});

// // add a result expression
// test("Context Expression", async ({ expressionSelector }) => {});

// // reset a expression
// test("Context Expression", async ({ expressionSelector }) => {});

// // paste a expression ONLY FOR chromiumn
// test("Context Expression", async ({ expressionSelector }) => {});

// // resize
// test("Context Expression", async ({ expressionSelector }) => {});

// // reset resize
// test("Context Expression", async ({ expressionSelector }) => {});

// // add a two rows expression and resize
// test("Context Expression", async ({ expressionSelector }) => {});
});

This file was deleted.

2 changes: 1 addition & 1 deletion packages/boxed-expression-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"start": "webpack serve -c ./dev-webapp/webpack.config.js --host 0.0.0.0 --env dev",
"storybook": "storybook dev -p 6006",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"",
"test:e2e": "run-script-if --ignore-errors \"$(build-env integrationTests.ignoreFailures)\" --bool \"$(build-env integrationTests.run)\" --then \"pnpm rimraf ./dist-tests\" \"pnpm playwright install --with-deps\" \"pnpm test:e2e:run\"",
"test:e2e": "run-script-if --ignore-errors \"$(build-env integrationTests.ignoreFailures)\" --bool \"$(build-env integrationTests.run)\" --then \"pnpm rimraf ./dist-tests\" \"pnpm test:e2e:run\"",
"test:e2e:open": "pnpm exec playwright show-report dist-tests/reporter",
"test:e2e:run": "pnpm exec playwright test"
},
Expand Down

0 comments on commit c816b02

Please sign in to comment.