-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from turingschool/feat/contact_dropdown
Feat/contact dropdown
- Loading branch information
Showing
4 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ describe('Create New Job Application page after logging in', () => { | |
}, | ||
}).as("getCompanies"); | ||
|
||
|
||
cy.intercept("GET", "http://localhost:3001/api/v1/users/2/job_applications", (req) => { | ||
req.on("response", (res) => { | ||
res.setDelay(2000); | ||
|
@@ -55,10 +56,45 @@ describe('Create New Job Application page after logging in', () => { | |
status: 'Offer', | ||
job_description: 'Test Description', | ||
application_url: 'www.example.com', | ||
notes: 'Test Notes' | ||
notes: 'Test Notes', | ||
} | ||
}).as('addJobApplication'); | ||
|
||
cy.intercept("GET", "http://localhost:3001/api/v1/users/2/contacts", { | ||
statusCode: 200, | ||
body: { | ||
"data": [ | ||
{ | ||
"id": "2", | ||
"type": "contacts", | ||
"attributes": { | ||
"first_name": "Jane", | ||
"last_name": "Smith", | ||
"company_id": 1, | ||
"email": "[email protected]", | ||
"phone_number": "123-555-5678", | ||
"notes": "HR contact at Future Designs LLC", | ||
"user_id": 2, | ||
"company": { | ||
"id": 1, | ||
"name": "Future Designs LLC", | ||
"website": "https://futuredesigns.com", | ||
"street_address": "456 Future Blvd", | ||
"city": "Austin", | ||
"state": "TX", | ||
"zip_code": "73301", | ||
"notes": "Submitted application for the UI Designer role." | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
headers: { | ||
Authorization: "Bearer The token", | ||
"Content-Type": "application/json", | ||
}, | ||
}).as("get-contact-details-no-comp"); | ||
|
||
cy.visit("http://localhost:3000/"); | ||
cy.get('#email').type('[email protected]'); | ||
cy.get('#password').type('Jolene123'); | ||
|
@@ -78,6 +114,7 @@ describe('Create New Job Application page after logging in', () => { | |
cy.get('label').contains('Date Applied:').should('exist'); | ||
cy.get('label').contains('Application Status:').should('exist'); | ||
cy.get('label').contains('Job Description:').should('exist'); | ||
cy.get('label').contains('Contact Information:').should('exist'); | ||
cy.get('label').contains('Application URL:').should('exist'); | ||
cy.get('label').contains('Notes:').should('exist'); | ||
}) | ||
|
@@ -88,6 +125,7 @@ describe('Create New Job Application page after logging in', () => { | |
cy.get('#dateApplied').type('2025-01-01').should('have.value', '2025-01-01'); | ||
cy.get('#appStatus').select('Offer').should('have.value', '3'); | ||
cy.get('#jobDescription').type('Test Description').should('have.value', 'Test Description'); | ||
cy.get('#appContact').select('Jane Smith').should('have.value', '2'); | ||
cy.get('#appURL').type('www.example.com').should('have.value', 'www.example.com'); | ||
cy.get('#notes').type('Test Notes').should('have.value', 'Test Notes'); | ||
}) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters