Skip to content

Commit

Permalink
Merge pull request #141 from pushkar1995/missionsTesting
Browse files Browse the repository at this point in the history
Missions testing
  • Loading branch information
BilalLiaquat7 authored Sep 9, 2023
2 parents cbb8680 + 694645f commit aabe935
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 100 deletions.
17 changes: 5 additions & 12 deletions src/pages/Missions/Missions.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,11 @@ td p.not-member {
}

button {
padding: 8px 16px;
border: 1px solid #ccc;
padding: 10px 16px;
border: 1px solid #5b5c55;
border-radius: 4px;
width: max-content;
align-items: center;
font-size: large;
cursor: pointer;
}

button.leave {
color: red;
border: 1px solid red;
}

button.join {
color: red;
border: 1px solid red;
}
4 changes: 2 additions & 2 deletions src/pages/Missions/Missions.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const Missions = () => {
<button
type="button"
style={{
color: mission.reserved ? 'red' : '',
border: mission.reserved ? '1px solid red' : '',
color: !mission.reserved ? '#5b5c55' : '',
border: !mission.reserved ? '1px solid #5b5c55' : '',
}}
onClick={() => dispatch(joiningMission(mission.mission_id))}
>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Rockets/RocketInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const RocketInfo = ({
<div>
<img className="rockets-pictures" src={image[0]} alt="rockets-pictures" />
</div>
<div className="rockets-info">
<article className="rockets-info">
<h2 className="rocket-name">{name}</h2>
<p>
{reserved ? <span className="reservation-status">Reserved</span> : null}
Expand All @@ -36,7 +36,7 @@ const RocketInfo = ({
>
{reserved ? 'Cancel Reservation' : 'Reserve Rocket'}
</button>
</div>
</article>
</div>
);
};
Expand Down
27 changes: 0 additions & 27 deletions src/tests/Missions.test.js

This file was deleted.

57 changes: 0 additions & 57 deletions src/tests/Rockets.test.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,3 @@
// import React from 'react';
// import { render } from '@testing-library/react';
// import { Provider } from 'react-redux';
// import configureStore from 'redux-mock-store';
// import Rockets from '../pages/Rockets/Rockets';

// jest.mock('../redux/rocketSlice');

// const mockStore = configureStore([]);

// describe('Rockets Component', () => {
// let store;

// beforeEach(() => {
// store = mockStore({
// rockets: {
// status: 'succeeded',
// error: null,
// },
// });
// });

// it(' it renders loading state', () => {
// store = mockStore({
// rockets: {
// status: 'loading',
// error: null,
// },
// });

// const { container } = render(
// <Provider store={store}>
// <Rockets />
// </Provider>,
// );

// expect(container).toMatchSnapshot();
// });

// it('renders error state', () => {
// store = mockStore({
// rockets: {
// status: 'failed',
// error: 'Test Error',
// },
// });

// const { container } = render(
// <Provider store={store}>
// <Rockets />
// </Provider>,
// );

// expect(container).toMatchSnapshot();
// });
// });

import React from 'react';
import { render } from '@testing-library/react';
import { useSelector } from 'react-redux';
Expand Down

0 comments on commit aabe935

Please sign in to comment.