-
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 #5 from AbuBakkar32/abu-bakkar
Abu bakkar
- Loading branch information
Showing
7 changed files
with
4,647 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
const {defineConfig} = require("cypress"); | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
env: { | ||
codeCoverage: { | ||
url: 'http://localhost:3000/__coverage__', | ||
}, | ||
}, projectId: '5r89t6', e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
|
||
require('@cypress/code-coverage/task')(on, config) | ||
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc')) | ||
return config | ||
}, | ||
}, | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
describe('Contact Us Form', () => { | ||
it('Contact Us Form validation checking....', () => { | ||
// Step 1: Launch browser | ||
// Cypress automatically launches the browser | ||
|
||
// Step 2: Navigate to url 'http://automationexercise.com' | ||
cy.visit('http://automationexercise.com'); | ||
|
||
// Step 3: Verify that home page is visible successfully | ||
cy.url().should('include', 'automationexercise'); | ||
|
||
// Step 4: Click on 'Contact Us' button | ||
cy.contains('Contact us').click(); | ||
|
||
// Step 5: Verify 'GET IN TOUCH' is visible | ||
cy.get('#contact-page > div.row > div.col-sm-8 > div > h2').should('contain', 'Get In Touch'); | ||
|
||
// Step 6: Enter name, email, subject and message | ||
cy.get('[data-qa="name"]').type('Test User'); | ||
cy.get('[data-qa="email"]').type('testuser@example.com'); | ||
cy.get('[data-qa="subject"]').type('Test Subject'); | ||
cy.get('[data-qa="message"]').type('Test Message'); | ||
|
||
// Step 7: Upload file | ||
const fileName = 'C:\\Users\\ABS RAKIB\\Videos\\Abu Bakkar Siddikk-CV.pdf'; | ||
cy.get('input[type=file]').selectFile(fileName); | ||
|
||
// Step 8: Click 'Submit' button | ||
cy.get('[data-qa="submit-button"]').click(); | ||
|
||
// Step 9: Click OK button | ||
cy.on('window:confirm', () => true); | ||
|
||
// Step 10: Verify success message 'Success! Your details have been submitted successfully.' is visible | ||
cy.get('.status ').should('contain', 'Success! Your details have been submitted successfully.'); | ||
|
||
// Step 11: Click 'Home' button and verify that landed to home page successfully | ||
cy.get('#form-section > a > span > i').click(); | ||
cy.url().should('include', 'automationexercise'); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
describe('Verify Test Cases Page', () => { | ||
it('Verify Test Cases Page', () => { | ||
// Step 1: Launch browser | ||
// Cypress automatically launches the browser | ||
|
||
// Step 2: Navigate to url 'http://automationexercise.com' | ||
cy.visit('http://automationexercise.com'); | ||
|
||
// Step 3: Verify that home page is visible successfully | ||
cy.url().should('include', 'automationexercise'); | ||
|
||
// Step 4: Click on 'Test Cases' button | ||
cy.contains('Test Cases').click(); | ||
|
||
cy.get('#form > div > div.row > div > h2').should('contain', 'Test Cases'); | ||
|
||
// Step 5: Verify user is navigated to test cases page successfully | ||
cy.url().should('include', 'test_cases'); | ||
}); | ||
}); |
Binary file added
BIN
+41.1 KB
...ts/logout_user.cy.js/Logout User -- should login and logout a user (failed).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.9 KB
...ster User with existing email -- Register User with existing email (failed).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.