diff --git a/packages/frontend/cypress/fixtures/createRoom.json b/packages/frontend/cypress/fixtures/createRoom.json new file mode 100644 index 00000000..dad8f0e2 --- /dev/null +++ b/packages/frontend/cypress/fixtures/createRoom.json @@ -0,0 +1,20 @@ +{ + "createTime": "2023-07-04T19:29:54.001Z", + "status": "OK", + "msg": "", + "room": { + "roomId": "sxsxs111", + "roomName": "一起玩富饒之城", + "holderId": "player1", + "holderName": "陳XX", + "users": [ + { + "userId": "player1", + "userImage": "imageName1", + "userName": "陳XX" + } + ], + "status": "OPEN", + "totalUsers": 1 + } +} diff --git a/packages/frontend/cypress/support/commands.js b/packages/frontend/cypress/support/commands.js index bfea242d..32f2099a 100644 --- a/packages/frontend/cypress/support/commands.js +++ b/packages/frontend/cypress/support/commands.js @@ -36,24 +36,7 @@ Cypress.Commands.add('setupIntercept', () => { userImage: 'imageName1' } req.reply({ - createTime: '2023-07-04T19:29:54.001Z', - status: 'OK', - msg: '', - room: { - roomId: 'sxsxs111', - roomName: '一起玩富饒之城', - holderId: 'player1', - holderName: '陳XX', - users: [ - { - userId: 'player1', - userImage: 'imageName1', - userName: '陳XX' - } - ], - status: 'OPEN', - totalUsers: 1 - } + fixture: 'createRoom.json' }) } ).as('createRoomRequest')