File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -844,7 +844,7 @@ module.exports = defineConfig({
844844Kaikki testeissä olevat sovelluksen osoitetta käyttävät komennot
845845
846846` ` ` js
847- cy .visit (' http://localhost:3000' )
847+ cy .visit (' http://localhost:3000' )
848848` ` `
849849
850850voidaan muuttaa muotoon
@@ -865,8 +865,12 @@ module.exports = defineConfig({
865865 setupNodeEvents (on , config ) {
866866 },
867867 baseUrl: ' http://localhost:3000' ,
868- BACKEND : ' http://localhost:3001/api' // highlight-line
869868 },
869+ // highlight-start
870+ env: {
871+ BACKEND : ' http://localhost:3001/api'
872+ }
873+ // highlight-end
870874})
871875` ` `
872876
@@ -876,13 +880,13 @@ Korvataan testeistä kaikki backendin osoitteet seuraavaan tapaan
876880describe (' Note ' , function () {
877881 beforeEach (function () {
878882 cy .visit (' ' )
879- cy .request (' POST' , ` ${ Cypress .env (' EXTERNAL_API ' )} /testing/reset` ) // highlight-line
883+ cy .request (' POST' , ` ${ Cypress .env (' BACKEND ' )} /testing/reset` ) // highlight-line
880884 const user = {
881885 name: ' Matti Luukkainen' ,
882886 username: ' mluukkai' ,
883887 password: ' salainen'
884888 }
885- cy .request (' POST' , ` ${ Cypress .env (' EXTERNAL_API ' )} /users` , user) // highlight-line
889+ cy .request (' POST' , ` ${ Cypress .env (' BACKEND ' )} /users` , user) // highlight-line
886890 })
887891 // ...
888892})
You can’t perform that action at this time.
0 commit comments