{"id":15288937,"url":"https://github.com/simple-automation-testing/promod-system","last_synced_at":"2026-03-08T05:34:26.199Z","repository":{"id":57331676,"uuid":"423127032","full_name":"Simple-Automation-Testing/promod-system","owner":"Simple-Automation-Testing","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-22T12:26:43.000Z","size":464,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-28T23:21:55.748Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Simple-Automation-Testing.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-31T11:21:25.000Z","updated_at":"2025-05-22T12:26:46.000Z","dependencies_parsed_at":"2022-09-05T08:00:33.004Z","dependency_job_id":"bd268a32-a2f3-4179-8f91-ebd3efdd3f2c","html_url":"https://github.com/Simple-Automation-Testing/promod-system","commit_stats":{"total_commits":79,"total_committers":2,"mean_commits":39.5,"dds":"0.012658227848101222","last_synced_commit":"8149a3491eadc5eb2de03414e368a6357ca6d458"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Simple-Automation-Testing/promod-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fpromod-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fpromod-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fpromod-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fpromod-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simple-Automation-Testing","download_url":"https://codeload.github.com/Simple-Automation-Testing/promod-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fpromod-system/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265904251,"owners_count":23846673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-30T15:54:43.420Z","updated_at":"2026-03-08T05:34:21.158Z","avatar_url":"https://github.com/Simple-Automation-Testing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ch1 align=\"center\"\u003e PROMOD-SYSTEM \u003c/h1\u003e\n\t\u003cp align=\"center\"\u003e\u003cimg style=\"width:350px;height:300px;\" src=\"./.docs/promod-system.png\"/\u003e\u003c/p\u003e\n\n  \u003ch3 align=\"center\"\u003eDesigned for\n\t\u003ca href=\"https://www.npmjs.com/package/promod\"\u003epromod\u003c/a\u003e - works with anyone\n\t\u003c/h3\u003e\n\u003c/p\u003e\n\n\u003ch2\u003e API \u003c/h2\u003e\n\u003cp\u003e\nThe purpose of this library is building of the TAF ecosystem which will not\nregardless of library or framework which you use for your automation testing\n\u003c/p\u003e\n\n\u003cp\u003e\u003ca href=\"/.docs/elements.md\"\u003eElement(s)\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"/.docs/browser.md\"\u003eBrowser\u003c/a\u003e\u003c/p\u003e\n\n\u003cp\u003e\u003ca href=\"/.docs/env.vars.md\"\u003ePromodSystem env var usage\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"/.docs/test-runner.md\"\u003ePromodSystem test runner (powered by mocha)\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"/.docs/system-element.md\"\u003ePromodSystem base element\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"/.docs/system-structure.md\"\u003ePromodSystem base structure\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"/.docs/system-collection.md\"\u003ePromodSystem base collection\u003c/a\u003e\u003c/p\u003e\n\n## Usage. [promod](https://www.npmjs.com/package/promod) example.\n\n- [Waiters](#waiters)\n- [Core](#core)\n\n### Waiters\n\n```ts\nimport { seleniumWD } from 'promod';\nimport { createBrowserWaiters, createElementWaiters } from 'promod-system';\n\nconst { browser, $ } = seleniumWD;\n\n;(async () =\u003e {\n\tawait getSeleniumDriver({seleniumAddress: 'http://localhost:4444/wd/hub'}, browser);\n\n\tconst browserWaiters = createBrowserWaiters(browser);\n\tconst elementWaiters = createElementWaiters();\n\tconst documentBody = $('body');\n\n\tawait browser.get('https://www.npmjs.com/');\n\tawait browserWaiters.waitForTabTitleIncludes('promod', {timeout: 10_000});\n\tawait elementWaiters.waitForTextIncludes(documentBody, 'promod' {timeout: 10_000});\n})();\n```\n\n### Core\n\n```ts\nimport { waitFor } from 'sat-wait';\nimport { seleniumWD } from 'promod';\nimport { PromodSystemStructure } from 'promod-system';\n\nimport type { PromodElementType } from 'promod/built/interface';\n\nconst timeouts = {\n\ts: 5000,\n\tm: 10000,\n\tl: 15000,\n\txl: 25000,\n}\n\n\nclass BaseElement extends PromodSystemElement\u003cPromodElementType\u003e {\n  constructor(locator: string, name: string, rootElement) {\n    super(locator, name, rootElement);\n  }\n\n\t/**\n\t * @info\n\t * this method should be overridden,\n\t * method will be execute to wait visibility before next base methods\n\t * sendKeys, get, action\n\t * ! for isDisplayed method waitLoadedState will not be executed.\n\t */\n  async waitLoadedState() {\n    await waitForCondition(async () =\u003e this.rootElement.isDisplayed(), {\n\t\t\tmessage: `Element ${this.identifier} with root selector ${this.rootLocator}\nshould become visible during ${timeouts.l} ms.`\n\t\t\ttimeout: timeouts.l\n\t\t});\n  }\n\n\t/**\n\t * @info\n\t * this method should be overridden,\n\t * method will be execute inside sendKeys method\n\t * depends on base library/framework specific\n\t */\n  async baseSendKeys(value): Promise\u003cvoid\u003e {\n    await this.rootElement.sendKeys(value);\n  }\n\n\t/**\n\t * @info\n\t * this method should be overridden,\n\t * method will be execute inside get method\n\t * depends on base library/framework specific\n\t */\n  async baseGetData(): Promise\u003c{ background: any; value: any }\u003e {\n    return browser.executeScript(() =\u003e  {\n      \tconst background = arguments[0].style.background;\n\t\t\t\tconst value = arguments[0].value;\n\t\t\t\tconst rect = arguments[0].getBoundingClientRect();\n\t\t\t\tconst text = arguments[0].innerText.trim()\n\n\t\t\t\treturn {background, value, rect, text}\n\t\t}, this.rootElement.getEngineElement());\n  }\n}\n\nclass BaseFragment extends PromodSystemStructure {\n  constructor(locator: string, name: string, rootElement: PromodElementType) {\n    super(locator, name, rootElement);\n  }\n\n  init(locator: string, name: string, Child: new (...args) =\u003e any, ...rest) {\n    return new Child(locator, name, this.rootElement.$(locator), ...rest);\n  }\n\n\tinitCollection(locator: string, name: string, Collection: new (...args) =\u003e any, Child: new (...args) =\u003e any) {\n    return new Collection(locator, name, this.rootElement.$$(locator), Child);\n  }\n\n\t/**\n\t * @info\n\t * this method should be overridden, it will be execute to wait visibility before next base methods\n\t * sendKeys, get, action\n\t * ! for isDisplayed method waitLoadedState will not be executed.\n\t */\n  async waitLoadedState() {\n    await waitForCondition(async () =\u003e this.rootElement.isDisplayed(), {\n\t\t\tmessage: `Fragment ${this.identifier} with root selector ${this.rootLocator}\nshould become visible during ${timeouts.l} ms.`\n\t\t\ttimeout: timeouts.l\n\t\t});\n  }\n}\n\nclass BasePage extends PromodSystemStructure {\n  constructor(locator: string, pageName: string) {\n    super(locator, structureName, $(locator));\n  }\n\n  init(locator: string, name: string, Child: new (...args) =\u003e any) {\n    return new Child(locator, name, this.rootElement.$(locator));\n  }\n\n  initCollection(locator: string, name: string, Collection: new (...args) =\u003e any, Child: new (...args) =\u003e any) {\n    return new Collection(locator, name, this.rootElement.$$(locator), Child);\n  }\n\n\t/**\n\t * @info\n\t * this method should be overridden,\n\t * method will be execute to wait visibility before next base methods\n\t * sendKeys, get, action\n\t * ! for isDisplayed method waitLoadedState will not be executed.\n\t */\n  async waitLoadedState() {\n    await waitForCondition(async () =\u003e this.rootElement.isDisplayed(), {\n\t\t\tmessage: `Page ${this.identifier} with root selector ${this.rootLocator}\n\t\t\tshould become visible during ${timeouts.l} ms.`\n\t\t\ttimeout: timeouts.l\n\t\t});\n  }\n}\n```\n\n## Improvement/new features plan\n\n- [x] Fix hardcoded values\n- [x] Generate get random flows for several fields\n- [ ] Config validation\n- [ ] Logging\n- [ ] Error messages\n- [x] Generate config `baseElementsActionsDescription` part based on base elements library\n- [ ] Generate base library\n- [ ] Generate project example\n- [ ] Вepth level flow generation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-automation-testing%2Fpromod-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimple-automation-testing%2Fpromod-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-automation-testing%2Fpromod-system/lists"}