Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/qahive/generator-robotframework)

# Yeoman Generator for Robot Framework
# The Robot Fraemwork Test Project Generator

## Local setup
## Usage

Install `yo` and `generator-robotframework`:

```text
npm install -g yo generator-robotframework
```

Generate test project:

yo robotframework


## Supported Configurations

**General**
* Test library: `Puppeteer` (Default `Puppeteer`)
* Page object pattern: `Yes`, `No` (Default `Yes`)
* ATDD/BDD style: `Yes`, `No` (Default `No`)

FYI: Test library: `Selenium` and `Appium` will support soon.

## Manual Setup
Run following command

npm install -g .
cd tmp
yo robotframework-puppeteer
yo robotframework
74 changes: 45 additions & 29 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,51 @@ module.exports = class extends Generator {
"I'll walk you through the installation."
));

return this.prompt([{
type: "input",
name: "isPageObject",
message: "Would you like to use Page object pattern?",
default: true
}, {
type: "input",
name: "isAtdd",
message: "Would you like to use ATDD/BDD style?",
default: false
}/*, {
type: "input",
name: "isPdf",
message: "Would you like to include PDF reader?",
default: true
}, {
type: "input",
name: "zxing",
message: "Would you like to include QRCode reader?",
default: true
}, {
type: "input",
name: "percy",
message: "Would you like to include Visual Testing?",
default: true
} */ ]).then(answers => {
this.args = answers;
this.config.set(this.args);
});
return this.prompt([
{
type: "input",
name: "testLibrary",
message: "Please select test library. (Puppeteer)",
default: 'Puppeteer',
validate: function (input) {
return ['puppeteer'].includes(input.toLowerCase());
}
},
{
type: "input",
name: "isPageObject",
message: "Would you like to use Page object pattern? (Yes/No)",
default: 'Yes',
validate: function (input) {
return ['yes', 'no'].includes(input.toLowerCase());
}
}, {
type: "input",
name: "isAtdd",
message: "Would you like to use ATDD/BDD style? (Yes/No)",
default: 'No',
validate: function (input) {
return ['yes', 'no'].includes(input.toLowerCase());
}
}/*, {
type: "input",
name: "isPdf",
message: "Would you like to include PDF reader?",
default: true
}, {
type: "input",
name: "zxing",
message: "Would you like to include QRCode reader?",
default: true
}, {
type: "input",
name: "percy",
message: "Would you like to include Visual Testing?",
default: true
} */ ]).then(answers => {
this.args = answers;
this.config.set(this.args);
});
}

writing() {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "generator-robotframework-puppeteer",
"name": "generator-robotframework",
"version": "0.1.2",
"description": "Yeoman generator to create a robotframework puppeteer project",
"description": "Yeoman generator to create a robotframework test project",
"files": [
"generators"
],
Expand All @@ -11,15 +11,15 @@
"puppeteer",
"robotframework-puppeteer"
],
"homepage": "https://github.com/qahive/generator-robotframework-puppeteer",
"homepage": "https://github.com/qahive/generator-robotframework",
"author": "Atthaboon Sanurt <atthaboon.s@gmail.com>",
"contributors":[
"contributors": [
"Atthaboon Sanurt <atthaboon.s@gmail.com>",
"Penploy Sribumrungwong <penploy.s@gmail.com>"
],
"repository": {
"type": "git",
"url": "git://github.com/qahive/generator-robotframework-puppeteer.git"
"url": "git://github.com/qahive/generator-robotframework.git"
},
"dependencies": {
"chalk": "^4.1.0",
Expand Down