Skip to content

Commit

Permalink
changed directories
Browse files Browse the repository at this point in the history
  • Loading branch information
uziab committed Oct 29, 2024
1 parent f6013a5 commit d7e08a9
Show file tree
Hide file tree
Showing 40 changed files with 31 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ coverage
.scannerwork
*.env
.DS_Store
packages/testing-kit/test-results
packages/testing-kit/reports
packages/testkit/test-results
packages/testkit/reports
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
},
"devDependencies": {
"lerna": "^8.1.2",
"typescript": "^4.7.3",
"@playwright/test": "1.45.3"
},
"typescript": "^4.7.3"
},
"workspaces": [
"packages/*"
]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from '@playwright/test';
import { Button } from '../buttons/Button'; // Assuming you have this Button class
import { Button } from '../buttons/Button';

test('should fire a click event and log to console', async ({ page }) => {
// Navigate to the Storybook page with the component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.describe("ButtonGroup Class with Storybook", () => {
test.beforeEach(async ({ page }) => {
// Navigate to the Storybook story where the ButtonGroup component is rendered
await page.goto("/?path=/story/buttons-buttongroup--default");
//TODO - find a better way to wait for the storybook to load
//TODO - find a better way to wait for the storybook to load
// Locate the iframe where the Storybook component is rendered
const frame = page.frameLocator("[id='storybook-preview-iframe']");

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { test, expect } from "@playwright/test";
import { DropDown } from "../inputs/DropDown";
import { Dropdown } from "../inputs/Dropdown";


test.describe("dropdown Class with Storybook", () => {
let Dropdown;
let DropDown;

test.beforeEach(async ({ page }) => {
await page.goto("/?path=/story/inputs-dropdown--overview");
const frame = page.frameLocator("[id='storybook-preview-iframe']");
const DropDownLocator = frame.locator('[id="dropdown-menu-id"]');
Dropdown = new DropDown(page, DropDownLocator, "Test DropDown");
DropDown = new Dropdown(page, DropDownLocator, "Test DropDown");
});

test("set dropdown value", async ({page}) => {
await Dropdown.selectItem("2");
await DropDown.selectItem("2");
await page.waitForTimeout(500);
expect(await Dropdown.getText()).toContain("Option 2");
expect(await DropDown.getText()).toContain("Option 2");
});
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseElement } from "../BaseElement";
* Class representing a DropDown element.
* Extends the BaseElement class.
*/
export class DropDown extends BaseElement {
export class Dropdown extends BaseElement {
inputField: TextField;
override page: Page;
override locator: Locator;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { TextField } from "./TextField";
export { DropDown } from "./DropDown";
export { Dropdown } from "./Dropdown";
export { Checkbox } from "./Checkbox";
export { TextArea } from "./TextArea";
export { Toggle } from "./Toggle";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/testkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"test:e2e": "npx playwright test",
"build": "tsc",
"start-server": "cd .. && cd core && yarn storybook"
"start-server": "yarn lerna run storybook --scope=monday-ui-react-core"
},
"bugs": {
"url": "https://github.com/mondaycom/vibe/issues"
Expand Down
File renamed without changes.
File renamed without changes.
30 changes: 15 additions & 15 deletions packages/testkit/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@


import { defineConfig } from '@playwright/test';
import path from "path";

/**
* @see https://playwright.dev/docs/test-configuration
*/
module.exports = defineConfig({

export default defineConfig({
fullyParallel: false,
workers: 1,
reporter: [["html", { open: "never", outputFolder: path.join(__dirname, "/reports") }]],
// Run your local dev server before starting the tests
webServer: {
command: 'yarn start-server',
url: 'http://127.0.0.1:7008',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
stdout: 'ignore',
stderr: 'pipe',
},
reporter: [["html", { open: "never", outputFolder: path.join(process.cwd(), "/reports") }]],

// Run your local dev server before starting the tests
webServer: {
command: 'yarn start-server',
url: 'http://127.0.0.1:7008',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
stdout: 'ignore',
stderr: 'pipe',
},

use: {
headless: true,
baseURL: "http://127.0.0.1:7008",
Expand All @@ -31,4 +31,4 @@ module.exports = defineConfig({
}
},
timeout: 180 * 1000,
});
});
File renamed without changes.
File renamed without changes.
68 changes: 0 additions & 68 deletions packages/testkit/reports/index.html

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/testkit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"rootDir": "src/",
"rootDir": ".",
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
},
"include": ["src/**/*"]
"include": [ "buttons", "inputs", "navigation", "pickers", "popover", "text", "utils", "BaseElement.ts", "index.ts"]
}
File renamed without changes.

0 comments on commit d7e08a9

Please sign in to comment.