You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,14 +174,16 @@ There are 2 types of Cypress tests, e2e & component.
174
174
If you are creating an e2e test, it will live in the `cypress/e2e` directory. Component tests will need to be created in a directory called `cypress/component `
175
175
176
176
#### Cypress ENV Variables
177
-
- the Cypress suite requires an environment variable that should be stored in your `.env.development` and not committed to git.
177
+
- the Cypress suite requires an environment variable that should be stored in your `.env` and not committed to git.
178
178
- TEST_SESSION_COOKIE=
179
-
- to get the value for this variable, open your browser to your running app at `localhost:3000`.
179
+
- to get the value for this variable, open your browser to your running app at `localhost:3000`
180
+
- sign in
180
181
- inspect the page
181
-
- click the "Application" tab
182
+
- Chrome: click the "Application" tab
183
+
- Firefox: click the "Storage" tab
182
184
- click "Cookies"
183
185
- find the value for `next-auth.session-token`
184
-
- copy that value and paste it in the `TEST_SESSION_COOKIE` variable in your .env.development
186
+
- copy that value and paste it in the `TEST_SESSION_COOKIE` variable in your `.env`
185
187
- do not ever commit this value
186
188
- this value will need to be updated whenever the cookie expires, approximately once per month
// TODO: currently this uses a real request uuid, which would allow it to visit a route that actually existed.
5
-
// since the routes are generated dynamically, we will need to mock the next router in order to generate a route for a fake request w/ mock uuid within the test
6
-
// this test should remain skipped until the above is done since it runs as a regular e2e vs e2e with mocked data
7
-
// Existing ticket to complete this test: https://github.com/scientist-softserv/webstore/issues/218
8
-
letuuid=useOneRequestResponseBody.uuid
1
+
import{
2
+
requestUuidasuuid,
3
+
requestPageApiCalls,
4
+
}from'../support/e2e'
9
5
6
+
describe('Viewing one request',()=>{
10
7
describe('as a logged out user',()=>{
11
8
it('should show an error message.',()=>{
12
9
cy.visit(`/requests/${uuid}`)
@@ -17,99 +14,128 @@ describe.skip('Viewing one request', () => {
17
14
})
18
15
19
16
describe('as a logged in user',()=>{
20
-
// declare variables that can be used to change how the response is intercepted.
0 commit comments