Skip to content

Commit

Permalink
fix(ci error fix): fix errors and apply changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
haticecs committed Apr 12, 2022
1 parent 06d883d commit 10b1170
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 302 deletions.
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
}
};
11 changes: 3 additions & 8 deletions src/App.test.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { render } from '@testing-library/react';
import { Provider } from 'react-redux';
import store from './app/store';

import App from './App';

test('renders learn react link', () => {
const { getByText } = render(
<Provider store={store}>
<App />
</Provider>,
);
const { getByText } = render(<App />);

expect(getByText(/learn/i)).toBeInTheDocument();
expect(getByText(/Hello World/i)).toBeInTheDocument();
});
10 changes: 0 additions & 10 deletions src/app/store.js

This file was deleted.

5 changes: 4 additions & 1 deletion src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import mainHero from '../../assets/images/main-hero.svg';
import { HOME_PAGE_TITLE, HOME_INFORMATION_TEXT } from '../../constants/index';
import {
HOME_PAGE_TITLE,
HOME_INFORMATION_TEXT,
} from '../../pages/Home/constants';

function Information() {
return (
Expand Down
8 changes: 6 additions & 2 deletions src/components/Header/Header.test.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { render, cleanup } from '@testing-library/react';

import Header from './Header';
import { HOME_PAGE_TITLE, HOME_INFORMATION_TEXT } from '../../constants/index';
import {
HOME_PAGE_TITLE,
HOME_INFORMATION_TEXT,
} from '../../pages/Home/constants';

describe('Header', () => {
afterEach(() => cleanup());
Expand All @@ -13,7 +17,7 @@ describe('Header', () => {
test('Header Page Title should have the primary color', () => {
const { getByText } = render(<Header />);
const headerPageTitle = getByText(HOME_PAGE_TITLE);
expect(headerPageTitle).toHaveStyle(`color: rgb(106,44,112,1)`);
expect(headerPageTitle).toHaveStyle('color: rgb(106,44,112,1)');
});

test('should render Header Information Text', () => {
Expand Down
1 change: 1 addition & 0 deletions src/components/ProjectCard/ProjectCard.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import PropTypes from 'prop-types';

import featuredProjectImg from '../../assets/images/featuredProjectImg.png';

function ProjectCard({ title, image, description }) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Slider/Slider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Slider({ items }) {

const slideRef = useRef();

// fucntion calculate the right index and sets it
// Function that calculates and sets the right index
const handleOnClick = useCallback(
(direction) => {
if (direction === 'left') {
Expand Down Expand Up @@ -65,5 +65,5 @@ export default function Slider({ items }) {
}

Slider.propTypes = {
items: PropTypes.string.isRequired,
items: PropTypes.instanceOf(Array).isRequired,
};
5 changes: 3 additions & 2 deletions src/components/Transation/Transation.test.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render, cleanup } from '@testing-library/react';

import Transation from './Transation';

describe('Transation', () => {
Expand Down Expand Up @@ -30,14 +31,14 @@ describe('Transation', () => {
<Transation mainText={MAIN_TEXT} subText={SUB_TEXT} />,
);
const Container = getByTestId('transation-container');
expect(Container).toHaveStyle(`background-color: rgb(106,44,112,1)`);
expect(Container).toHaveStyle('background-color: rgb(106,44,112,1)');
});

test('should have white text color', () => {
const { getByTestId } = render(
<Transation mainText={MAIN_TEXT} subText={SUB_TEXT} />,
);
const Container = getByTestId('transation-container');
expect(Container).toHaveStyle(`color: rgb(255,255,255,1)`);
expect(Container).toHaveStyle('color: rgb(255,255,255,1)');
});
});
7 changes: 0 additions & 7 deletions src/components/index.js

This file was deleted.

67 changes: 0 additions & 67 deletions src/features/counter/Counter.js

This file was deleted.

78 changes: 0 additions & 78 deletions src/features/counter/Counter.module.css

This file was deleted.

4 changes: 0 additions & 4 deletions src/features/counter/counterAPI.js

This file was deleted.

73 changes: 0 additions & 73 deletions src/features/counter/counterSlice.js

This file was deleted.

33 changes: 0 additions & 33 deletions src/features/counter/counterSlice.spec.js

This file was deleted.

9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom';

import './index.css';
import { Provider } from 'react-redux';
import Home from './pages/Home';
import store from './app/store';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(
<React.StrictMode>
<Provider store={store}>
<Home />
</Provider>
<App />
</React.StrictMode>,
document.getElementById('root'),
);
Expand Down
Loading

0 comments on commit 10b1170

Please sign in to comment.