profile
viewpoint
Anton Telesh Antontelesh EPAM Systems Minsk http://antontelesh.github.io Lead Software Engineer at EPAM Systems

downshift-js/downshift 8867

🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.

Antontelesh/mochawesome-merge 52

Merge several Mochawesome JSON reports

Antontelesh/athletic 1

A lightweight library for declarative applications

Antontelesh/application_model 0

A Model class on top of CoffeeScript and Object.defineProperty()

Antontelesh/book-library-webpack 0

Learning Webpack with test project

Antontelesh/calculator 0

This is a test repo to reproduce conventional-changelog/standard-version#235

Antontelesh/chat 0

Simple chat application

Antontelesh/compose-validators 0

Composable JavaScript validators

issue closedAntontelesh/mochawesome-merge

Inconvenient usage for HTML generation

I've been following this guide (the CLI way): https://www.npmjs.com/package/mochawesome-merge#cypress But it puts report files all over the place. I'd like all files ideally be in cypress/results. For example like this:

RESULTS_DIR=cypress/results

mochawesome-merge $RESULTS_DIR/mochawesome*.json --output $RESULTS_DIR/all.json
marge --reportDir $RESULTS_DIR --reportFilename mochawesome.html $RESULTS_DIR/all.json

As you could see, I had to add quite some additional code so that the end result is still mochawesome.html. Partly because mochawesome does not follow a unique naming for the JSON files, that is, the first file isn't numbered. Ideally I would like to have a command like this:

# Dream command that fits into `package.json` as a post-script:
mochawesome-merge cypress/results/*.json --saveHtml --reportDir cypress/results

(Something like that, whatever fits best to the tool.)

Could you please provide us with something like that? Thanks in advance.

closed time in 19 days

rkrisztian

issue commentAntontelesh/mochawesome-merge

Inconvenient usage for HTML generation

Generating html is a responsibility of mochawesome report generator (marge).

mochawesome-merge exists to combine several json reports into one.

I would recommend you to split these two tasks into two commands if one command does not look beautiful for you

rkrisztian

comment created time in 19 days

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       {         test: /\.css$/,         use: [+          'classnames',           MiniCssExtractPlugin.loader,           {             loader: "css-loader",

Сейчас вы используете переменную classNames, которая нигде не объявлена

Antontelesh

comment created time in 24 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       {         test: /\.css$/,         use: [+          'classnames',           MiniCssExtractPlugin.loader,           {             loader: "css-loader",

Если вы хотите использовать лоадер, то тогда используйте импорт из css файла как функцию, как это описано в описании лоадера

Antontelesh

comment created time in 24 days

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       {         test: /\.css$/,         use: [+          'classnames',           MiniCssExtractPlugin.loader,           {             loader: "css-loader",

classnames - это не лоадер для вебпака. Это пакет, который надо использовать в файлах, как в моём примере выше

Antontelesh

comment created time in 24 days

PullRequestReviewEvent

Pull request review commentKiryl7/UniCinema

Module 3

 import React from "react"-import './SearchFilter.css'+import styles from './SearchFilter.css'  function SearchFilter() {     return(-        <div className = 'SearchFilter'>-            <div className = 'p-SearchFilter'><p>SEARCH BY     </p></div>+        <div className={styles.searchFilter}>+            <p>SEARCH BY     </p>                 <div> -                    <div class="form_toggle">           -                    <div className="form_toggle-item item-1">-                        <input id="fid-1" type="radio" name="radio" value="off" checked/>-                        <label for="fid-1">TITLE</label>+                    <div className={styles.form_toggle}>           +                    <div className={styles.form_toggle_item, styles.item_1}>+                        <input id="fid_1" type="radio" name="radio" value="off" checked/>+                        <label for="fid_1">TITLE</label>                     </div>-                    <div className="form_toggle-item item-2">-                        <input id="fid-2" type="radio" name="radio" value="on"/>-                        <label for="fid-2">GENRE</label>+                    <div className={styles.form_toggle_item, styles.item_2}>+                        <input id="fid_2" type="radio" name="radio" value="on"/>+                        <label for="fid_2">GENRE</label>

Потому что у вас синтаксис неправильный:

<div className={styles.form_toggle_item, styles.item_2}>

Всё, что вы пишете в JSX в фигурных скобках — обычные JS выражения. Если в JS выражении поставить запятую, то всё, что до запятой, будет проигнорировано.

Если вы хотите объединить несколько имён классов, то вам нужно сформировать строку с несколькими именами классов:

<div className={`${styles.form_toggle_item} ${styles.item_2}`}>

Но чтобы не формировать вручную такие строки, существует npm пакет classnames. Я вам рекомендую его установить и использовать здесь:

import classNames from 'classnames';

<div className={classNames(styles.form_toggle_item, styles.item_2)}>
Antontelesh

comment created time in 24 days

PullRequestReviewEvent

pull request commentKiryl7/UniCinema

Module 3

Запустите npm install сначала

Antontelesh

comment created time in 25 days

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       },       {         test: /\.css$/,-        use: ["style-loader", {loader: "css-loader", options: {modules: true}}]+        use: [MiniCssExtractPlugin.loader, 'css-loader']

Заметьте, что названия с дефисом (kebab-case) преобразуются в camelCase. Потому что в JS вы не можете использовать дефис в названиях свойств объекта. Иначе они будут расценены как знак минус. Поэтому и NaN у вас

Antontelesh

comment created time in 25 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       },       {         test: /\.css$/,-        use: ["style-loader", {loader: "css-loader", options: {modules: true}}]+        use: [MiniCssExtractPlugin.loader, 'css-loader']
.tail-top {
  color: red;
}
import styles from “./styles.css”

<div className={styles.tailTop}>Hello</div>
Antontelesh

comment created time in 25 days

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       },       {         test: /\.css$/,-        use: ["style-loader", {loader: "css-loader", options: {modules: true}}]+        use: [MiniCssExtractPlugin.loader, 'css-loader']

Не надо писать “local”. Просто напишите имя класса как в обычном CSS файле

Antontelesh

comment created time in 25 days

PullRequestReviewEvent

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       },       {         test: /\.css$/,-        use: ["style-loader", {loader: "css-loader", options: {modules: true}}]+        use: [MiniCssExtractPlugin.loader, 'css-loader']
use: [
  MiniCssExtractPlugin.loader,
  {
    loader: "css-loader",
    options: { modules: true }
  }
]

смотрите, вам нужно так

Antontelesh

comment created time in 25 days

PullRequestReviewEvent

pull request commentKiryl7/UniCinema

Module 3

По поводу основного содержимого страницы — я вам рекомендую создать компонент MovieList, где рендерить список ul с элементами li, где будет содержимое каждого фильма. Пока можно сделать статическую вёрстку, а потом мы её заменим на динамическую

Antontelesh

comment created time in a month

Pull request review commentKiryl7/UniCinema

Module 3

+import React from "react"+import Search from './Search/Search.js'+import SearchButton from './SearchButton/SearchButton.js'+import SearchFilter from './SearchFilter/SearchFilter.js'+import './Header.css'++function Header() {+    return (+        <div className = "tail-top"> 

лучше не ставьте пробелы в атрибутах — так никто не делает и это сбивает с толку

Antontelesh

comment created time in a month

PullRequestReviewEvent

Pull request review commentKiryl7/UniCinema

Module 3

 module.exports = {       },       {         test: /\.css$/,-        use: ["style-loader", {loader: "css-loader", options: {modules: true}}]+        use: [MiniCssExtractPlugin.loader, 'css-loader']

смотрите, здесь вы убрали возможность использовать css-модули, поэтому они у вас и не работают. Нужно вернуть настройки css-loader.

MiniCssExtractPlugin нужно было применить только вместо style-loader

Antontelesh

comment created time in a month

PullRequestReviewEvent

PR opened Kiryl7/UniCinema

Module 3
+361 -15

0 comment

28 changed files

pr created time in a month

push eventKiryl7/UniCinema

JlEB

commit sha 61aad1abf6c3b6f686df66692ff70d7b0e508133

Initial commit

view details

Anton Telesh

commit sha 28aa1da06bdf1f3131e5572be1d93c44121013eb

Start cinema project

view details

Anton Telesh

commit sha d09be291ecc6787b1d314a347ba27ee65b4a96fb

Add SearchForm

view details

JlEB

commit sha 729fa02b6e26fc98f85895debb00340cb2ec23d6

Add Header Component change "Search div"

view details

JlEB

commit sha e94f1eeddc37c32fb423275e36c53a255dc7f527

Finish Header

view details

JlEB

commit sha 56f7ba8a0af644eb96ca396b02d5d06cb8445972

Add MidleContainer

view details

push time in a month

push eventKiryl7/UniCinema

JlEB

commit sha 61aad1abf6c3b6f686df66692ff70d7b0e508133

Initial commit

view details

push time in a month

PR closed Kiryl7/UniCinema

Module 3
+1 -1351368

3 comments

14277 changed files

Antontelesh

pr closed time in a month

push eventKiryl7/UniCinema

Anton Telesh

commit sha 8c80336201b728f2d82bf8f4428c256a13ceb7ae

remove node_modules from git

view details

push time in a month

pull request commentKiryl7/UniCinema

Module 3

Я убрал из гита папки node_modules и dist

Antontelesh

comment created time in a month

push eventKiryl7/UniCinema

Anton Telesh

commit sha bb782684cccab23433ace3d4d031dea5465d3858

remove node_modules and dist

view details

push time in a month

pull request commentKiryl7/UniCinema

Module 3

Как-то вы добавили node_modules в .gitignore, но всё равно они попали в изменения. Я разберусь с этим

Antontelesh

comment created time in a month

pull request commentKiryl7/UniCinema

Module 3

Папку dist тоже нужно поместить в .gitignore, иначе могут появляться конфликты после сборки

Antontelesh

comment created time in a month

PR opened Kiryl7/UniCinema

Module 3
+748 -90

0 comment

42 changed files

pr created time in a month

create barnchKiryl7/UniCinema

branch : module-3

created branch time in a month

push eventKiryl7/UniCinema

push time in a month

issue commentAntontelesh/mochawesome-merge

Question: Does this preserve the cli options passed to marge?

Thank you for confirmation, @tnrich

tnrich

comment created time in a month

issue commentAntontelesh/mochawesome-merge

Question: Does this preserve the cli options passed to marge?

How does --no-showPassed affects the report JSON?

tnrich

comment created time in a month

issue commentAntontelesh/mochawesome-merge

Question: Does this preserve the cli options passed to marge?

Hey @tnrich , I don't think I understand the question. mochawesome-merge command does not have anything in common with the marge one. They're completely separate CLI commands

tnrich

comment created time in a month

pull request commentAntontelesh/mochawesome-merge

🐛 corret merge stats' start and end date

:tada: This PR is included in version 4.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

stormslowly

comment created time in a month

pull request commentAntontelesh/mochawesome-merge

build(deps): bump lodash from 4.17.15 to 4.17.19

:tada: This PR is included in version 4.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

dependabot[bot]

comment created time in a month

release Antontelesh/mochawesome-merge

v4.2.0

released time in a month

created tagAntontelesh/mochawesome-merge

tagv4.2.0

Merge several Mochawesome JSON reports

created time in a month

push eventAntontelesh/mochawesome-merge

Shu Pengfei

commit sha 3dcdd79fc3eac1847999d6d7d77048cb0dca09a9

feat(stats): correct start and end date in stats Co-authored-by: pshu <pishu.spf@antfin.com>

view details

push time in a month

PullRequestReviewEvent

issue commentAntontelesh/mochawesome-merge

JSON files not found.

So, the first error is probably because when you run yarn command_name it runs command_name from within your project root, regardless if you do cd folder-name before. That’s my assumption.

The second error is easily fixable. It happens because if you use the > operator to write to the file, it will write all the yarn output to that file, including the first console message before actually running the command. That generates invalid JSON.

To fix it, just change the > operator to the -o option, like the following:

yarn mochawesome-merge ./cypress/report/*.json -o ./cypress/report/mochawesome.json
akshaysgithub

comment created time in 3 months

issue commentAntontelesh/mochawesome-merge

JSON files not found.

Could you try providing a path pattern yourself instead of changing directory to $PWD/cypress/report?

Something like this:


build:
    commands:
      - ls -al
      - pwd
      - npx wait-on http://localhost:3000 &
      - npx cypress run --env MAGENTO_HOST=COMPANYDOMAIN.com
      - yarn add mocha@5.2.0 mochawesome mochawesome-merge
      - yarn mochawesome-merge ./cypress/report/mochawesome-report/*.json > mochawesome.json
      - yarn marge mochawesome.json
      - aws s3 sync $PWD/cypress/report/mochawesome-report/ s3://cypress.company.com/
akshaysgithub

comment created time in 3 months

issue commentAntontelesh/mochawesome-merge

JSON files not found.

@akshaysgithub could you send the actual error being thrown?

akshaysgithub

comment created time in 3 months

more