Skip to content

Commit

Permalink
Next (#127)
Browse files Browse the repository at this point in the history
* reorganize source files

* rename all jsx files to js

* src: prettier

* src/lib: prettier

* src/client: prettier

* src/client - styles: prettier

* add prettier config

* pkg: update eslint deps and add prettier

* update babel; fix some tests

* ignore bin and lib dirs

* update stylelint

* update webpack

* update mobx

* update deps

* change version to alpha

* update dev npm script

* fix lint issues in src/bin and src/lib

* Test fixtures (#119)

* Create functions to generate test fixtures

* Update types to match updated report data structure

* Update components to use results instead of allSuites

* Update semver check to include `alpha` and `beta`
- Additionally, update stringify fn to not omit null values

* test: update sample data

* test: add and update fixtures

* test: use fixtures and update tests

* test: prettier

* update eslint config for prettier

* fix some lint errors and set others to warnings
- someday I will update components for accessibility but today is not that day

* update travis config to drop node 4

* add package-lock

* remove before install from travis config

* update code climate test reporter for travis

* A11y (#121)

* chore: update webpack-dev-server

* wrap test header contents in a button

* use <ul> for test list and <li> for test component

* use <ul> for suite list and wrap suite in <li>

* update hover/focus styles for test button

* move error text inside test header button

* update default button focus style

* update toggles to use checkbox input and fix styles

* add focus styles to nav menu links

* always show close button in nav menu

* pressing escape will close nav menu

* update babel/webpack dev deps

* update react

* update eslint, stylelint, prettier

* update test tools

* update misc dev deps

* update project deps
- chalk, yargs, validator

* navbar: adjust percent titles to be fixed to 2 decimal places

* toggle-switch: update styles to match material-ui

* dropdown selector: make more accessible

* nav-menu: set tab index for disabled links

* fix stylelint

* navbar: adjust styles for menu button

* update changelog

* bump alpha version

* tweak code and context colors for readability; update suite title font size

* suite: allow suites to be collapsed

* options: default charts to false

* NavMenu: increase test coverage

* bump alpha version
  • Loading branch information
adamgruber authored Jun 4, 2019
1 parent 186a31a commit 9508ce9
Show file tree
Hide file tree
Showing 138 changed files with 21,097 additions and 3,851 deletions.
15 changes: 11 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"presets": [
"react",
"es2015",
"stage-0"
"@babel/preset-react",
[
"@babel/preset-env",
{
"targets": ">0.25%, not ie 11, not op_mini all, not dead"
}
]
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
],
"plugins": ["transform-decorators-legacy"],
"env": {
"test": {
"plugins": ["istanbul"]
Expand Down
67 changes: 14 additions & 53 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"parser": "babel-eslint",
"extends": "eslint-config-airbnb",
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["react", "jsx-a11y"],
"rules": {
"react/require-default-props": 0,
"import/no-unresolved": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/forbid-prop-types": 0,
"import/no-extraneous-dependencies": 0,
"lines-between-class-members": 0,
"react/destructuring-assignment": 0,
"react/default-props-match-prop-types": [0, { "allowRequiredDefaults": true }],
"no-underscore-dangle": 0,
"jsx-a11y/click-events-have-key-events": 1,
"jsx-a11y/anchor-is-valid": 1
},
"env": {
"browser": true,
"node": true,
Expand All @@ -11,57 +24,5 @@
"globals": {
"chai": true,
"sinon": true
},
"rules": {
"react/default-props-match-prop-types": [2, { "allowRequiredDefaults": true }],
"react/jsx-curly-spacing": [2, "always"],
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-quotes": 0,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/jsx-closing-bracket-location": [2, "after-props" ],
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": 2,
"react/no-unknown-property": 2,
"react/prop-types": 2,
"react/forbid-prop-types": 0,
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/sort-comp": 0,
"react/jsx-no-bind": 1,
"react/require-default-props": 0,
"react/prefer-stateless-function": [2, { "ignorePureComponents": true }],

"jsx-a11y/anchor-is-valid": 1,
"jsx-a11y/click-events-have-key-events": 1,
"jsx-a11y/no-static-element-interactions": 0,

"arrow-parens": [2, "as-needed"],
"quotes": [2, "single", "avoid-escape"],
"jsx-quotes": [2, "prefer-single"],
"comma-dangle": [2, "never"],
"indent": [2, 2],
"object-curly-newline": 0,
"object-curly-spacing": [2, "always"],
"array-bracket-spacing": [2, "always"],
"no-undef": 2,
"no-underscore-dangle": 0,
"func-names": 0,
"no-else-return": 0,
"no-console": 1,
"no-throw-literal": 0,
"id-length": 0,
"no-unused-expressions": 0,
"no-param-reassign": 0,
"max-len": [1, 100],
"no-confusing-arrow": 0,
"semi": [1, "always"],
"global-require": 0,
"import/no-unresolved": 0,
"import/no-extraneous-dependencies": 0,
"import/extensions": 0,
"valid-jsdoc": ["error", { "requireReturn": false }]
}
}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ coverage
.nyc_output
test-functional/*.html
dist
bin/*.js
lib/*.js
bin/
lib/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"trailingComma": "es5",
"singleQuote": true,
"jsxBracketSameLine": true
}
2 changes: 1 addition & 1 deletion .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules/**/*.css
src/components/summary/*.css
src/client/components/summary/*.css
8 changes: 5 additions & 3 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"extends": "stylelint-config-standard",
"extends": [
"stylelint-config-standard",
"stylelint-config-prettier"
],
"plugins": [
"stylelint-order"
],
"rules": {
"at-rule-no-unknown": [true, { "ignoreAtRules": ["extend"]}],
"color-named": "never",
"comment-word-blacklist": ["/^TODO:/"],
"declaration-block-no-duplicate-properties": true,
"declaration-no-important": true,
"font-family-name-quotes": "always-unless-keyword",
"font-family-no-missing-generic-family-keyword": null,
"font-weight-notation": "named-where-possible",
"max-empty-lines": 2,
"max-nesting-depth": 3,
"no-descending-specificity": null,
"no-duplicate-selectors": true,
Expand All @@ -26,7 +29,6 @@
"selector-pseudo-element-colon-notation": "single",
"selector-type-no-unknown": [ true, { ignoreTypes: ["/^--/"] } ],
"shorthand-property-no-redundant-values": null,
"string-quotes": "single",
"time-min-milliseconds": 100,
"unit-whitelist": ["px", "rem", "em", "%", "deg", "s"],
"value-no-vendor-prefix": true
Expand Down
19 changes: 10 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
env:
global:
- CC_TEST_REPORTER_ID=5a6fbf144bbc7fe5bf3dccf6ddc6ac4eae6a95636073a604c2aa27e535e789a9
language: node_js
node_js:
- "4"
- "6"
before_install:
- npm install react-test-renderer
addons:
code_climate:
repo_token: 5a6fbf144bbc7fe5bf3dccf6ddc6ac4eae6a95636073a604c2aa27e535e789a9
- 'node'
- 'lts/*'
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
after_script:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < ./coverage/lcov.info
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# mochawesome-report-generator changelog

## [Unreleased]
### Changed
- Updated data validation to match mochawesome v4 changes
- Updated many components for accessibility
- Enhanced keyboard usage (tabbing / toggling)
- Updated all dependencies
- Implemented test fixtures for generating sample data
- Small design tweaks
- Allow suites to be collapsed
- Disable charts by default

## [3.1.5] / 2018-12-27
### Changed
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mochawesome-report-generator (marge)
<img align="right" src="./docs/marge-report-1.0.1.png" alt="Mochawesome Report" width="55%" />

- Simple, clean, and modern design
- Beautiful charts
- Support for test and suite nesting
- Displays before and after hooks
- Review test code inline
Expand All @@ -18,7 +17,6 @@ mochawesome-report-generator (marge)
- Filters to display only the tests you want
- Responsive and mobile-friendly
- Offline viewing
- Support for IE9+
- CLI for generating reports independent of [mochawesome][2]

## Usage with mochawesome
Expand Down Expand Up @@ -84,7 +82,7 @@ Flag | Type | Default | Description
-i, --inline | boolean | false | Inline report assets (scripts, styles)
--cdn | boolean | false | Load report assets via CDN (unpkg.com)
--assetsDir | string | [cwd]/mochawesome-report/assets | Path to save report assets (js/css)
--charts | boolean | true | Display Suite charts
--charts | boolean | false | Display Suite charts
--code | boolean | true | Display test code
--autoOpen | boolean | false | Automatically open the report
--overwrite | boolean | true | Overwrite existing report files. *See [notes](#overwrite).*
Expand Down
10 changes: 0 additions & 10 deletions bin/src/logger.js

This file was deleted.

48 changes: 0 additions & 48 deletions lib/src/main-html.jsx

This file was deleted.

Loading

0 comments on commit 9508ce9

Please sign in to comment.