-
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 #1 from bhargav-garlapati/smart-ui
Smart UI
- Loading branch information
Showing
9 changed files
with
498 additions
and
14 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
45 changes: 45 additions & 0 deletions
45
cypress/e2e/lambdatest_ui_test_using_dynamic_content.cy.js
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,45 @@ | ||
// This script uses LambdaTest SmartUI Cypress SDK and LambdaTest Cypress CLI to run the tests using dynamic content on the-internet.herokuapp.com. | ||
// To setup at the LambdaTest dasboard | ||
// Step 1: https://smartui.lambdatest.com/projects, | ||
// Step 2: Create new project, Select CLI option | ||
// Step 3: Create new project name and continue | ||
// Step 4: Follow the instructions to install the LambdaTest CLI and run the tests | ||
|
||
|
||
describe('Welcome to the-internet', () => { | ||
const data = require('../fixtures/content.json'); | ||
|
||
it('UI Test using Dynamic content 1', () => { | ||
|
||
// Visit dynamic_content page | ||
cy.visitPage('/dynamic_content?with_content=static'); | ||
|
||
// Check h3 text | ||
cy.get('h3') | ||
.contains(data.dynamicContent); | ||
|
||
// Check content row 1 and take snapshot | ||
cy.get('[id="content"] [class="row"]').eq(1).should('be.visible'); | ||
cy.smartuiSnapshot('Row-1', { | ||
element: { | ||
cssSelector: '[id="content"] > .row:nth-of-type(1)', | ||
} | ||
}); | ||
|
||
// Check content row 2 and take snapshot | ||
cy.get('[id="content"] [class="row"]').eq(2).should('be.visible'); | ||
cy.smartuiSnapshot('Row-2', { | ||
element: { | ||
cssSelector: '[id="content"] > .row:nth-of-type(2)', | ||
} | ||
}); | ||
|
||
// Check content row 3 and take snapshot | ||
cy.get('[id="content"] [class="row"]').eq(3).should('be.visible'); | ||
cy.smartuiSnapshot('Row-3', { | ||
element: { | ||
cssSelector: '[id="content"] > .row:nth-of-type(3)', | ||
} | ||
}); | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"lambdatest_auth": { | ||
"username": "bhargavk.garlapati", | ||
"access_key": "mgoSYSnpLRh474YyjiTl1EQKwKXubFme1M6wHbTcSnVpMVILV1" | ||
}, | ||
"browsers": [{ | ||
"browser": "Chrome", | ||
"versions": ["130.0"], | ||
"platform": "Windows 10" | ||
}], | ||
"run_settings": { | ||
"reporter_config_file": "reporter-config.json", | ||
"specs": "cypress/e2e/lambdatest_ui_test_using_dynamic_content.cy.js", | ||
"ignore_files": "", | ||
"feature_file_suppport": false, | ||
"network": false, | ||
"headless": false, | ||
"npm_dependencies": { | ||
"cypress": "^13.15.1" | ||
}, | ||
"parallels": 1, | ||
"smart_ui": { | ||
"project": "smart_ui_cypress_example_e2e" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.