Skip to content

Commit

Permalink
chore: develop
Browse files Browse the repository at this point in the history
  • Loading branch information
DudaGod committed Sep 14, 2024
1 parent 8df828f commit 4219ddb
Show file tree
Hide file tree
Showing 11 changed files with 145 additions and 143 deletions.
20 changes: 20 additions & 0 deletions tests/e2e/skip-specs/read-tests-2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// import { expect } from "@wdio/globals";
// import { VSCodePO } from "../page-objects";

// describe("Testing view in sidebar", () => {
// describe("after read tests", () => {
// it("should replace loader item on main folder item in tree", async () => {
// const vscodePO = await VSCodePO.create();
// const testingViewControl = vscodePO.getTestingViewControl();
// await testingViewControl.open();

// const sidebar = vscodePO.getTestingSideBar();
// await sidebar.waitTestsRead();

// const [firstSection] = await sidebar.getSections();
// const firstItemLabel = await firstSection.getLabel();

// expect(firstItemLabel).toBe("tests");
// });
// });
// });
28 changes: 28 additions & 0 deletions tests/e2e/skip-specs/read-tests-3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// import { expect } from "@wdio/globals";
// import { VSCodePO } from "../page-objects";

// describe("Testing view in sidebar", () => {
// describe("after read tests", () => {
// it("should correctly render tests tree", async () => {
// const vscodePO = await VSCodePO.create();
// const testingViewControl = vscodePO.getTestingViewControl();
// await testingViewControl.open();

// const sidebar = vscodePO.getTestingSideBar();
// await sidebar.waitTestsRead();

// const [firstSection] = await sidebar.getSections();
// const [mainTreeItem] = await firstSection.getVisibleItems();

// await mainTreeItem.expandAll();
// const testsFullTitle = await mainTreeItem.getTestsFullTitle();

// expect(testsFullTitle).toEqual([
// "tests test.testplane.ts suite success chrome",
// "tests test.testplane.ts suite fail chrome",
// "tests test.testplane.ts suite skipped chrome",
// "tests test.testplane.ts test without suite chrome",
// ]);
// });
// });
// });
38 changes: 38 additions & 0 deletions tests/e2e/skip-specs/run-tests-1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// import { expect } from "@wdio/globals";
// import { VSCodePO } from "../page-objects";

// describe("Testing view in sidebar", () => {
// describe("run tests", () => {
// it("should correctly show test statistics after run all tests", async () => {
// const vscodePO = await VSCodePO.create();
// const testingViewControl = vscodePO.getTestingViewControl();
// await testingViewControl.open();

// const sidebar = vscodePO.getTestingSideBar();
// await sidebar.waitTestsRead();
// await sidebar.runAllTests();
// await sidebar.waitTestsRunComplete();

// await expect(await sidebar.getTestsRunStats()).toBe("2/3");

// const [firstSection] = await sidebar.getSections();
// const [mainTreeItem] = await firstSection.getVisibleItems();
// await mainTreeItem.expandAll();

// const items = await firstSection.getVisibleItems();

// await expect(items).toHaveLength(11);
// await expect(await items[0].getAriaLabelAttr()).toContain("tests (Failed)");
// await expect(await items[1].getAriaLabelAttr()).toContain("test.testplane.ts (Failed)");
// await expect(await items[2].getAriaLabelAttr()).toContain("suite (Failed)");
// await expect(await items[3].getAriaLabelAttr()).toContain("success (Passed)");
// await expect(await items[4].getAriaLabelAttr()).toContain("chrome (Passed)");
// await expect(await items[5].getAriaLabelAttr()).toContain("fail (Failed)");
// await expect(await items[6].getAriaLabelAttr()).toContain("chrome (Failed)");
// await expect(await items[7].getAriaLabelAttr()).toContain("skipped (Skipped)");
// await expect(await items[8].getAriaLabelAttr()).toContain("chrome (Skipped)");
// await expect(await items[9].getAriaLabelAttr()).toContain("test without suite (Passed)");
// await expect(await items[10].getAriaLabelAttr()).toContain("chrome (Passed)");
// });
// });
// });
27 changes: 27 additions & 0 deletions tests/e2e/skip-specs/run-tests-2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// import { expect } from "@wdio/globals";
// import { VSCodePO } from "../page-objects";

// describe("Testing view in sidebar", () => {
// describe("run tests", () => {
// it("should run only child tests by click on suite item", async () => {
// const vscodePO = await VSCodePO.create();
// const testingViewControl = vscodePO.getTestingViewControl();
// await testingViewControl.open();

// const sidebar = vscodePO.getTestingSideBar();
// await sidebar.waitTestsRead();

// const [firstSection] = await sidebar.getSections();
// const [mainTreeItem] = await firstSection.getVisibleItems();

// await mainTreeItem.expandAll();
// const suiteTreeItem = await firstSection.getVisibleItemByLabel("suite");

// const runTestButton = await suiteTreeItem!.getActionButton("Run Test");
// await runTestButton?.elem.click();
// await sidebar.waitTestsRunComplete();

// await expect(await sidebar.getTestsRunStats()).toBe("1/2");
// });
// });
// });
27 changes: 27 additions & 0 deletions tests/e2e/skip-specs/run-tests-3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// import { expect } from "@wdio/globals";
// import { VSCodePO } from "../page-objects";

// describe("Testing view in sidebar", () => {
// describe("run tests", () => {
// it("should run only one test by click on test item", async () => {
// const vscodePO = await VSCodePO.create();
// const testingViewControl = vscodePO.getTestingViewControl();
// await testingViewControl.open();

// const sidebar = vscodePO.getTestingSideBar();
// await sidebar.waitTestsRead();

// const [firstSection] = await sidebar.getSections();
// const [mainTreeItem] = await firstSection.getVisibleItems();

// await mainTreeItem.expandAll();
// const testTreeItem = await firstSection.getVisibleItemByLabel("test without suite");

// const runTestButton = await testTreeItem!.getActionButton("Run Test");
// await runTestButton?.elem.click();
// await sidebar.waitTestsRunComplete();

// await expect(await sidebar.getTestsRunStats()).toBe("1/1");
// });
// });
// });
20 changes: 0 additions & 20 deletions tests/e2e/specs/read-tests-2.ts

This file was deleted.

28 changes: 0 additions & 28 deletions tests/e2e/specs/read-tests-3.ts

This file was deleted.

38 changes: 0 additions & 38 deletions tests/e2e/specs/run-tests-1.ts

This file was deleted.

27 changes: 0 additions & 27 deletions tests/e2e/specs/run-tests-2.ts

This file was deleted.

27 changes: 0 additions & 27 deletions tests/e2e/specs/run-tests-3.ts

This file was deleted.

8 changes: 5 additions & 3 deletions tests/e2e/wdio.conf.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import path from "node:path";
import type { Options } from "@wdio/types";

const extensionPath = process.cwd();
const workspacePath = path.resolve(process.cwd(), process.env.VSCODE_E2E_EXTENSION_PATH || "samples/basic");
// TODO: VSCODE_E2E_EXTENSION_PATH - support ???

const extensionPath = path.join(process.cwd(), process.env.VSCODE_E2E_EXTENSION_PATH || "out");
const workspacePath = path.resolve(process.cwd(), process.env.VSCODE_E2E_WORKSPACE_PATH || "samples/basic");

export const config: Options.Testrunner = {
runner: "local",
specs: ["./specs/**/*.ts"],
maxInstances: 10,
maxInstances: 1,
capabilities: [
{
browserName: "vscode",
Expand Down

0 comments on commit 4219ddb

Please sign in to comment.