Skip to content

Ramonredux#4

Open
ramonwrocha wants to merge 11 commits intodevelopfrom
ramonredux
Open

Ramonredux#4
ramonwrocha wants to merge 11 commits intodevelopfrom
ramonredux

Conversation

@ramonwrocha
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Owner

@dailymp dailymp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review comments and try to fix the work related.

Comment on lines +1 to +9
import React from 'react';
import { render } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is failing

//https://store-webapi.herokuapp.com/swagger-ui.html#/produto-controller

const url = 'https://store-webapi.herokuapp.com/api/produto';

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you define a file to isolate all api urls?


export const getAPI = () => {
return new Promise(resolve => {
fetch(url)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use axios as alternative to fetch?

<Row>

<Col md="6">
<Form.Group controlId="descricao">
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to program all in english, can you adjust to that?

}
}

export default connect(null, mapDispatchToProps)(ModalAdd); No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We avoid export default, can you refactor the export defaults one?

Comment on lines +1 to +3
// This optional code is used to register a service worker.
// register() is not called by default.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the unused files

Comment on lines +1 to +5
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see there is only one test and it is failing, we need at least 75% of coverage

Comment on lines +1 to +8
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `npm start`

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a good readme related to your work

Comment on lines +1 to +6
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use less can you use it?

Comment on lines +1 to +7
import React from 'react';
import './App.css';
import User from './components/User';
import { useSelector } from "react-redux";
import Table from './components/Table';

export default function App() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use typescript, can you use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants