Skip to content

Commit 60fe4b6

Browse files
committed
skip test and add comments
1 parent a4772e1 commit 60fe4b6

File tree

1 file changed

+17
-47
lines changed

1 file changed

+17
-47
lines changed

cypress/e2e/request.cy.js

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import useOneRequestResponseBody from '../fixtures/one-request/request.json'
22

3-
describe('Viewing one request', () => {
4-
// currently this is using a real request ID, since the routes are generated dynamically, so far i haven't found a way to generate a route for a fake request within the test
3+
describe.skip('Viewing one request', () => {
4+
// 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
57
let uuid = useOneRequestResponseBody.uuid
68

79
describe('as a logged out user', () => {
@@ -87,58 +89,26 @@ describe('Viewing one request', () => {
8789
describe('request page components are loading successfully, &', () => {
8890
context('the request page', () => {
8991
before(() => {
90-
loading = false
92+
loading =
9193
request = true
9294
proposals = true
9395
messages = true
9496
files = true
9597
})
98+
9699
it("should show the request stats section.", () => {
97-
console.log({loading, request, proposals, messages, files, error})
98-
// cy.get('div.request-stats-card').should('exist').then(() => {
99-
// cy.log('Request stats section renders successfully.')
100-
// })
100+
cy.get('div.request-stats-card').should('exist').then(() => {
101+
cy.log('Request stats section renders successfully.')
102+
})
101103
})
102-
// it("should show the status bar.", () => {
103-
// cy.get("div[data-cy='status-bar']").should('exist').then(() => {
104-
// cy.log('Status bar renders successfully.')
105-
// })
106-
// })
107-
})
108104

109-
// context('the user has 0 requests', () => {
110-
// before(() => {
111-
// requestList = false
112-
// })
113-
// it("should show a message notifying the user they don't have any requests.", () => {
114-
// cy.get('p.no-requests').contains('You do not have any requests yet.').then(() => {
115-
// cy.log('Successfully viewing request page with no requests.')
116-
// })
117-
// })
118-
// })
119-
120-
// context('the user can see the <LinkedButton /> component', () => {
121-
// [true, false].forEach((value) => {
122-
// before(() => {
123-
// requestList = value
124-
// })
125-
// it(`should show a button that links to the initialize request page for the default ware ${value ? 'with a request list' : 'with 0 requests'}.`, () => {
126-
// cy.get("a[data-cy='linked-button']").should('have.attr', 'href', `/requests/new/make-a-request?id=123`).then(() => {
127-
// cy.log('The <LinkedButton /> component displays correctly')
128-
// })
129-
// })
130-
// })
131-
// })
105+
it("should show the status bar.", () => {
106+
cy.get("div[data-cy='status-bar']").should('exist').then(() => {
107+
cy.log('Status bar renders successfully.')
108+
})
109+
})
110+
// TODO: add tests to confirm that messages, files, additional info, document sections all show correctly.
111+
})
132112
})
133113
})
134-
})
135-
136-
137-
// it('renders the request page with the appropriate components', () => {
138-
// let requestPath = useOneRequestResponseBody.request.href.pathname
139-
// //let scientistApiBaseURL = `https://${Cypress.env('NEXT_PUBLIC_PROVIDER_NAME')}.scientist.com/api/${Cypress.env('NEXT_PUBLIC_SCIENTIST_API_VERSION')}`
140-
// cy.intercept('GET', `${scientistApiBaseURL}/quote_groups/*`, { fixture: 'one-request/request.json' }).as('useOneRequest')
141-
// //cy.wait(['@useOneRequest'])
142-
// cy.visit(requestPath)
143-
// cy.get('h1').should('contains.text', useOneRequestResponseBody.request.title)
144-
// })
114+
})

0 commit comments

Comments
 (0)