Skip to content

Commit

Permalink
hidden files added
Browse files Browse the repository at this point in the history
  • Loading branch information
Tallyb committed Feb 3, 2021
1 parent cd97d14 commit d33a8dd
Show file tree
Hide file tree
Showing 11 changed files with 240 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.vscode
**/vendor/*.js
build
coverage
dist
node_modules
package
reports
62 changes: 62 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"env": {
"node": true,
"commonjs": true,
"es6": true,
"jest": true,
"jasmine": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"no-console": ["error"],
"no-debugger": ["error"],
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxEOF": 1
}
],
"semi": ["error", "always"],
"import/order": ["error", {
"groups": ["index", "sibling", "parent", "internal", "external", "builtin"]
}],
"react/prop-types": "off",
"react/display-name": "off",
"@typescript-eslint/explicit-function-return-type": "off"
},
"settings": {
"import/extensions": [
".js",
".ts"
]
}
}
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
30 changes: 30 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test features

env:
CI: true
DEBUG: pw:api

on:
push:

jobs:
run:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- uses: bahmutov/npm-install@v2
- name: run features
run: npm run start
- name: generate report
run: npm run report
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-result-report
path: reports/cucumber-report.html
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
reports
build
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "auto",
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
15 changes: 15 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"oderwat.indent-rainbow",
"coenraads.bracket-pair-colorizer-2",
"wmaurer.change-case",
"alexkrechik.cucumberautocomplete",
"oouo-diogo-perdigao.docthis",
"eamodio.gitlens"
]
}
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"protocol": "inspector",
"console": "integratedTerminal",
"name": "Launch Features",
"stopOnEntry": false,
"program": "${workspaceRoot}/node_modules/@cucumber/cucumber/bin/cucumber-js",
"args": [
"features/**/*.feature",
"--require",
"env/set-environment-variables.ts",
"--require",
"world/custom-world.ts",
"--require",
"step-definitions/**/*.ts",
"--require",
"hooks/**/*.ts",
"--require-module",
"ts-node/register",
"--format-options" ,
"{\"snippetInterface\": \"async-await\"}",
"--format",
"summary",
"--tags",
"@debug",
"--publish-quiet"
],
"cwd": "${workspaceRoot}",
"runtimeArgs": [
"--nolazy"],
"sourceMaps": true
}
]
}
50 changes: 50 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"window.zoomLevel": 0,
"editor.tabSize": 2,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/build": true,
"node_modules/**": true,
},
"editor.tabCompletion": "on",
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.minimap.enabled": true,
"editor.minimap.showSlider": "always",
"editor.minimap.renderCharacters": true,
"editor.mouseWheelZoom": true,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true
},
"javascript.referencesCodeLens.enabled": true,
"typescript.referencesCodeLens.enabled": true,
"typescript.implementationsCodeLens.enabled": true,
"git.autofetch": true,
"eslint.alwaysShowStatus": true,
"eslint.options": {
"extensions": [".js", ".ts"]
},
"eslint.validate": ["javascript","typescript"],
"prettier.singleQuote": true,
"prettier.trailingComma": "all",

"cucumberautocomplete.syncfeatures": "./features/**/*.feature",
"cucumberautocomplete.steps": [
"step-definitions/**/*.ts"
],
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}

}
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# cucumber7-ts-starter
# cucumber7-playwright

A starter repo for using Cucumber(7) with Playwright using Typescript.

## Kudos

This repository is based on the [Cucumber-typescript-starter](https://github.com/hdorgeval/cucumber7-ts-starter/blob/main/package.json) repo.

[![Build Status](https://travis-ci.org/hdorgeval/cucumber7-ts-starter.svg?branch=main)](https://travis-ci.org/hdorgeval/cucumber7-ts-starter)
[![Build status](https://ci.appveyor.com/api/projects/status/v7ing1c5m9fr0fjf?svg=true)](https://ci.appveyor.com/project/hdorgeval/cucumber7-ts-starter)

Starter project to write and debug cucumber-js v7 features in TypeScript language

## After cloning the repo

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"scripts": {
"build": "rimraf build && npm run format && npm run lint && tsc && npm run cucumber-check",
"check": "cucumber-js features/**/*.feature --dry-run --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format summary --format progress --format progress-bar --publish-quiet",
"start": "cucumber-js features/**/*.feature --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format html:reports/report.html --format summary --format @cucumber/pretty-formatter --format cucumber-console-formatter --publish-quiet",
"eslint-fix": "eslint ./ --ext .js,.ts,.tsx --fix",
"eslint-init": "eslint --init",
"format": "prettier --write \"**/*.{ts,tsx,css,html}\" ",
"lint": "eslint ./ --ext .js,.ts,.tsx --format visualstudio --no-color --report-unused-disable-directives",
"only": "npm run cucumber -- --tags @only",
"report": "open reports/report.html",
"snippets": "cucumber-js features/**/*.feature --dry-run --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format snippets --publish-quiet",
"steps-usage": "cucumber-js features/**/*.feature --dry-run --require env/set-environment-variables.ts --require world/custom-world.ts --require step-definitions/**/*.ts --require hooks/**/*.ts --require-module ts-node/register --format-options \"{\\\"snippetInterface\\\": \\\"async-await\\\"}\" --format usage --publish-quiet",
"test": "npm run cucumber"
"snippets": "cucumber-js features/**/*.feature --dry-run --format snippets",
"steps-usage": "cucumber-js features/**/*.feature --dry-run",
"all": "cucumber-js features/**/*.feature",
"test": "cucumber-js"
},
"engines": {
"node": ">=14"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hdorgeval/cucumber7-ts-starter.git"
"url": "git+https://github.com/tallyb/cucumber7-playwright.git"
},
"author": "Henri d'Orgeval",
"license": "ISC",
Expand Down Expand Up @@ -54,4 +54,4 @@
"playwright": "1.8.0",
"prettier": "2.2.1"
}
}
}

0 comments on commit d33a8dd

Please sign in to comment.