Skip to content

Commit 0b13723

Browse files
committed
passportbundler/fix tests
1 parent 220daf9 commit 0b13723

File tree

12 files changed

+47
-283
lines changed

12 files changed

+47
-283
lines changed

client/src/components/controls/controls.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ const Controls = ({
102102
}
103103
}}
104104
>
105-
{mute ? <VolumeUpIcon sx={{ fontSize: 30, color: '#649559' }} /> : <VolumeOffIcon sx={{ fontSize: 30, color: '#f35959' }} />}
105+
{mute ?
106+
<VolumeUpIcon sx={{ fontSize: 30, color: '#649559' }} />
107+
:
108+
<VolumeOffIcon sx={{ fontSize: 30, color: '#f35959' }} />}
106109
</IconButton>
107110
</div>
108111

client/tests/src/components/header/header.test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ describe('The header', () => {
2323
profile: {
2424
authenticated: false,
2525
userip: "::ffff:127.0.0.1",
26-
username: null,
27-
displayname: null
26+
userId: null,
27+
displayName: null
2828
}
2929
},
3030
socket: { mySocketId: 'stub_my_socket_id', usersLoggedIn: 0 },
@@ -59,8 +59,8 @@ describe('The header', () => {
5959
expect(socketSpy).toHaveBeenCalledWith("SEND_LOGGED_IN_USER", {
6060
authenticated: true,
6161
userip: "::ffff:127.0.0.1",
62-
username: '0001',
63-
displayname: 'Stub Display Name'
62+
userId: '0001',
63+
displayName: 'Stub Display Name'
6464
})
6565
expect(toJson(wrapper)).toMatchSnapshot();
6666
})
@@ -80,8 +80,8 @@ describe('The header', () => {
8080
expect(socketSpy).toHaveBeenCalledWith("USER_LOGGED_OUT", {
8181
authenticated: true,
8282
userip: "::ffff:127.0.0.1",
83-
username: '0001',
84-
displayname: 'Stub Display Name',
83+
userId: '0001',
84+
displayName: 'Stub Display Name',
8585
remove: true
8686
})
8787
expect(assign).toHaveBeenCalledWith('/auth/logout')
@@ -147,7 +147,7 @@ describe('Component updates (CDU)', () => {
147147
...props.socket,
148148
temp: {
149149
invitationFrom: {
150-
displayname: 'stub_Invite_from',
150+
displayName: 'stub_Invite_from',
151151
difficulty: 3
152152
}
153153
}

client/tests/src/components/oponnent/opponentInfo.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ describe('The opponent info', () => {
7070
...props,
7171
socketState: {
7272
opponents: [{
73-
displayname: "stub opponent 1",
73+
displayName: "stub opponent 1",
7474
socketId: "stub-opponent-1-socketID"
7575
}, {
76-
displayname: "stub opponent 2",
76+
displayName: "stub opponent 2",
7777
socketId: "stub-opponent-2-socketID"
7878
}]
7979
}

client/tests/src/components/profile/MatchesTable.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('The Matches table', () => {
1919
const wrapper = shallow(<MatchesTable
2020
rows={stubProfile.userProfileResponse.matchStats}
2121
opponents={stubProfile.userProfileResponse.opponentNames}
22-
userId={stubProfile.user.profile.username}
22+
userId={stubProfile.user.profile.userId}
2323
/>)
2424
expect(toJson(wrapper)).toMatchSnapshot();
2525
})
@@ -30,7 +30,7 @@ describe('The Matches table row', () => {
3030
const props = {
3131
row: stubProfile.userProfileResponse.matchStats[0],
3232
opponents: stubProfile.userProfileResponse.opponentNames,
33-
userId: stubProfile.user.profile.username
33+
userId: stubProfile.user.profile.userId
3434
}
3535
const wrapper = shallow(<Row {...props} />)
3636
expect(toJson(wrapper)).toMatchSnapshot();
@@ -40,7 +40,7 @@ describe('The Matches table row', () => {
4040
const props = {
4141
row: stubProfile.userProfileResponse.matchStats[1],
4242
opponents: stubProfile.userProfileResponse.opponentNames,
43-
userId: stubProfile.user.profile.username
43+
userId: stubProfile.user.profile.userId
4444
}
4545
const wrapper = shallow(<Row {...props} />)
4646
expect(toJson(wrapper)).toMatchSnapshot();
@@ -51,7 +51,7 @@ describe('The Matches table row', () => {
5151
const props = {
5252
row: stubProfile.userProfileResponse.matchStats[0],
5353
opponents: stubProfile.userProfileResponse.opponentNames,
54-
userId: stubProfile.user.profile.username
54+
userId: stubProfile.user.profile.userId
5555
}
5656
const wrapper = shallow(<Row {...props} />)
5757
const expandButton = wrapper.find({ 'aria-label': "expand row" })
@@ -64,7 +64,7 @@ describe('The Matches table row', () => {
6464
const props = {
6565
row: stubProfile.userProfileResponse.matchStats[0],
6666
opponents: stubProfile.userProfileResponse.opponentNames,
67-
userId: stubProfile.user.profile.username
67+
userId: stubProfile.user.profile.userId
6868
}
6969
const wrapper = shallow(<Row {...props} />)
7070
const expandButton = wrapper.find({ 'aria-label': "expand row" })

client/tests/src/components/profile/__snapshots__/profile.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ exports[`The profile component will render for logged in user in match mode 1`]
8080
},
8181
]
8282
}
83-
userId="0001"
83+
userId="stub_google_id"
8484
/>
8585
</ForwardRef(Box)>
8686
`;

client/tests/stub.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ export const stubProfile = {
385385
profile: {
386386
authenticated: true,
387387
userip: "::ffff:127.0.0.1",
388-
username: "0001",
389-
displayname: "Stub Display Name"
388+
userId: "0001",
389+
displayName: "Stub Display Name"
390390
}
391391
},
392392
userProfileResponse: {
@@ -442,6 +442,7 @@ export const stubProfile = {
442442
],
443443
opponentNames: {
444444
"0002": "Stub oponent name"
445-
}
445+
},
446+
googleId: "stub_google_id"
446447
}
447448
}

server/tests/authentication/index.test.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

server/tests/authentication/isloggedin.test.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

server/tests/authentication/passport.test.js

Lines changed: 0 additions & 110 deletions
This file was deleted.

server/tests/authentication/routes.test.js

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)