Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[454] add tests to components folder #481

Merged
merged 10 commits into from
May 17, 2022
Merged

Conversation

cescoferraro
Copy link
Contributor

This PR add tests to the components located at the components folder

Changes

  • adds tests

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@cescoferraro cescoferraro changed the title [WIP] add tests to components folder add tests to components folder May 17, 2022
@cescoferraro cescoferraro changed the title add tests to components folder [454] add tests to components folder May 17, 2022
@cescoferraro cescoferraro requested a review from xoscar May 17, 2022 17:56
Copy link
Collaborator

@xoscar xoscar left a comment

Choose a reason for hiding this comment

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

Hey @cescoferraro great job man!

cursor: pointer;
color: ${({isSelected = false}) => (isSelected ? '#61175E' : '#9AA3AB')};
color: ${({$isSelected = false}) => ($isSelected ? '#61175E' : '#9AA3AB')};
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the idea behind this?

selectedType: SupportedDiagrams;
}

const DiagramSwitcher: React.FC<IDiagramSwitcherProps> = ({onSearch, onTypeChange, selectedType}) => {
const DiagramSwitcher: React.FC<IProps> = ({onSearch, onTypeChange, selectedType}) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like big names but I'm open to move the props interface for each component to IProps 😄

</Menu.SubMenu>
</S.NavMenu>
<S.NavMenu
selectedKeys={[pathname]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I usually prefer components over jsons, maybe we can discuss what's the advantage/disadvantage

@@ -0,0 +1,14 @@
import {MenuInfo} from 'rc-menu/lib/interface';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a small comment, you don't have to add the .tsx extension if the file doesn't explicitly use JSX

web/src/components/TestResults/TestResults.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,15 @@
import {useCallback} from 'react';
import {useStore} from 'react-redux';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This store is from the react-flow package not from react-redux

web/src/redux/apis/Test.api.ts Show resolved Hide resolved
web/src/utils/TestingModels.ts Show resolved Hide resolved
@cescoferraro cescoferraro merged commit 89a0a63 into main May 17, 2022
@mathnogueira mathnogueira deleted the feature/components_testing branch May 25, 2022 16:55
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