Back

Gotoko - Order-FE first time run issue & Tests Details

Copy Below Code View As A Text File Show Text Only Show API Edit Code
                            

You need to follow below steps New Process: (Apr-23) 1- Get updated .env file and paste it 2- Run STG or UAT Url and get token from there. If your Base_URL is STG then run STG url, If your Base_URL is UAT then run UAT url. https://order-stg.gotoko.io/oms/invoice/daftar-invoice/ https://order-uat.gotoko.io/oms/invoice/daftar-invoice/ 3- Now get token from application and paste it in local application tab of localhost. How to run Tests/Mock-Server: 1- For run tests, comment stg & uat url in .env file and uncomment locahost:3001 url (Mock server link). 2- To run the mock server run the below command - yarn test:mockserver Now your all pages data will be fetched from mock-server/stubs. 3- To run Test, we will use "Jest Runner" vs-code extension and click on run 4- To update snapshot run , "yarn test -u" To update snapshot for specific test run "yarn test -u -test="when limit is changed" " Old Process: 1- yarn install -- We will only use yarn . 2- you need to run mock server for that run this command. i.e. yarn run "test:mockserver"