chore(samples): interactive tutorials code samples for CRUD products#149
chore(samples): interactive tutorials code samples for CRUD products#149bcoe merged 2 commits intogoogleapis:mainfrom
Conversation
|
Warning: This pull request is touching the following templated files:
|
f76b2dc to
d30d858
Compare
sofisl
left a comment
There was a problem hiding this comment.
Looks good to me except for a few things:
- Environment variables during testing are pretty confusing if you're new to the repo. Unless the sample requires the use of env variables, can we move them to just be variables in the test files? And otherwise, can we include it in the test file itself (i.e., process.env.VARIABLE = 'value')?
- You need to run
npm run fixto get rid of the linting errors.
d30d858 to
c23cad1
Compare
c23cad1 to
7e0505c
Compare
62aec36 to
4b38384
Compare
4b38384 to
e989ce9
Compare
| ); | ||
|
|
||
| // Add fulfillment places with outdated time | ||
| placeIds = ['store4']; |
There was a problem hiding this comment.
As explained offline, the timestamp check is per-store/place. If we use a new store id here, this update will still be allowed.
| ); | ||
|
|
||
| // Remove fulfillment places with outdated time | ||
| placeIds = ['store2']; |
There was a problem hiding this comment.
Same comment here to use the same place id.
There was a problem hiding this comment.
We use here correct place id, because created product has placeIds: ['store1', 'store2', 'store3']
There was a problem hiding this comment.
In such case we will not be able to demo this case - as if we send the same store_id the second time there store Id was already deleted and the flow of checking the timestamps will probably not executed. So I suggest to remove this stem from the tutorials and from this sample
kweinmeister
left a comment
There was a problem hiding this comment.
Please address the issues flagged at the bottom of this page, e.g. creating variables that aren't used. Other than that, looks good!
e989ce9 to
b7e46b5
Compare
b7e46b5 to
9abee6e
Compare
9abee6e to
7d0e46c
Compare
|
In the interactive tutorials we ask our users to set the environment variables, so I assume that in the tests we need reproduce the user flow closely. from this point of view we cannot change how the variables are stored, and if we want to use process.env.VARIABLE to store the variables for tests, we will get them duplicated |
|
Looks good to me except for a few things: Environment variables during testing are pretty confusing if you're new to the repo. Unless the sample requires the use of env variables, can we move them to just be variables in the test files? And otherwise, can we include it in the test file itself (i.e., process.env.VARIABLE = 'value')? @sofisl I don't know why I cannot see my earlier comment on this review, so I will answer one more time here, sorry if it is a duplication. |
9bfc622 to
451ed32
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕