Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Precondition
url setting: e2e-automation-repo\cypress.config.js
info is here:NEW-Project Initialization
credentials setting: e2e-automation-repo\cypress\fixtures\testUsersUtils.js
info is here: NEW-Project Initialization
be aware of concept of automation testing in Cypress and read official documentation
Hello world test for PriceFx application
open firstTest.cy.js on your local PC in the cloned repo
path: e2e-automation-repo\cypress\e2e\final
use FElogin command like this: cy.FElogin('login')
this command is found in this file: e2e-automation-repo\cypress\support\commands.js
save and run your test
you should be logged in Price Fx application
...
now you can write your test.
command FElogin is needed to use in every test “it”, or you can add this FElogin command into beforeEach section and then it is not needed to use it in every “it”
...
Tips & tricks
for creating a test without commands, use primary elements with data-attributes in html code
data-test-column
data-column-name
data-test
data-test-parent
…..
...