{"id":19845355,"url":"https://github.com/qavajs/template","last_synced_at":"2025-05-01T21:30:29.532Z","repository":{"id":43053175,"uuid":"511024478","full_name":"qavajs/template","owner":"qavajs","description":"library that allow to define step definitions on Gherkin language","archived":false,"fork":false,"pushed_at":"2024-07-05T08:45:30.000Z","size":870,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-09T22:34:57.864Z","etag":null,"topics":["qa","test-automation","testing"],"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/qavajs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-07-06T06:57:01.000Z","updated_at":"2024-08-09T22:34:57.865Z","dependencies_parsed_at":"2023-09-26T15:11:49.302Z","dependency_job_id":null,"html_url":"https://github.com/qavajs/template","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":"0.19047619047619047","last_synced_commit":"3e0b0edf3792426c7d584a63b3c10502563f9c86"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qavajs%2Ftemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qavajs%2Ftemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qavajs%2Ftemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qavajs%2Ftemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qavajs","download_url":"https://codeload.github.com/qavajs/template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224278484,"owners_count":17285080,"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":["qa","test-automation","testing"],"created_at":"2024-11-12T13:07:23.606Z","updated_at":"2024-11-12T13:07:24.460Z","avatar_url":"https://github.com/qavajs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @qavajs/template\nLibrary that allow to define step definitions on Gherkin language.\n\n## Installation\n`npm install @qavajs/template`\n\n## Templates\n```gherkin\nFeature: Templates\n\n  Scenario: I login\n    When I open 'https://your-app.com'\n    And I type 'username' to 'Login Form \u003e Username Input'\n    And I type 'password' to 'Login Form \u003e Password Input'\n    And I click 'Login Form \u003e Login Button'\n```\n\nThen following template can be called from scenario as simple step\n\n```gherkin\nFeature: Auth\n\n  Scenario: Verify that user is able to login\n    When I login\n    Then I expect 'Header' to be visible\n```\n\n## Configuration\nTo use templates their location need to be passed to templates property of config file and library need to be listed\nin require\n```javascript\nmodule.exports = {\n    default: {\n        requireModule: [\n            '@qavajs/template'\n        ],\n        templates: ['templates/*.feature']\n    }\n}\n\n```\n\n## Parameters  \nTemplates also can accept parameters as `\u003cparam\u003e` e.g\n\n```gherkin\nFeature: Templates\n\n  Scenario: I login as '\u003cusername\u003e' with '\u003cpassword\u003e' password\n    When I open 'https://your-app.com'\n    And I type '\u003cusername\u003e' to 'Login Form \u003e Username Input'\n    And I type '\u003cpassword\u003e' to 'Login Form \u003e Password Input'\n    And I click 'Login Form \u003e Login Button'\n```\n\nThen following template can be called with actual params\n\n```gherkin\nFeature: Auth\n\n  Scenario: Verify that user is able to login\n    When I login as 'admin' with 'admin' password\n    Then I expect 'Header' to be visible\n```\n\n## Multiline parameter\nIt is also possible to pass multi line parameter to template\n```gherkin\nFeature: TextArea\n\n  Scenario: Verify that user is able to login\n    When I set text area:\n    \"\"\"\n    this\n    is\n    multiline\n    text\n    \"\"\"\n```\n\nMultiline data can be accessed by `\u003cqavajsMultiline\u003e` formal parameter in template\n```gherkin\nFeature: Templates\n\n  Scenario: I set text area:\n    When I type '\u003cqavajsMultiline\u003e' to 'Form \u003e Text Area'\n```\n\n## Key Value Params\nMultiple parameters can be passed in form of key-value data table\n```gherkin\nFeature: TextArea\n\n  Scenario: Verify that user is able to login\n    When I fill registration form:\n      | name     | John Dou                 |\n      | position | Test Automation Engineer |\n```\n\nAnd values can be accessed by corresponding keys\n```gherkin\nFeature: Templates\n\n  Scenario: I fill registration form:\n    When I type '\u003cname\u003e' to 'Form \u003e Name'\n    When I type '\u003cposition\u003e' to 'Form \u003e Position'\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqavajs%2Ftemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqavajs%2Ftemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqavajs%2Ftemplate/lists"}