Category:
Cypress
Cypress Describe
describe() is basically to group our test cases. We can nest our tests in groups as deep as we deem necessary. describe() takes two arguments, the first is the name of the test group, and the second is a callback function. There can be multiple describe in same file. Also one describe can be declared inside another describe.
Cypress Context
context() is just an alias for describe(), and behaves the same way.
Cypress it
it() is used for an individual test case. it() takes two arguments, a string explaining what the test should do, and a callback function which contains our actual test:
Cypress Specify
specify() is an alias for it(), so choose whatever terminology works best for you.
describe('First Describe', () => {
describe('Describe Inside Describe', () => {
it('first test inside', () => {
})
})
it('1st test', () => {
})
specify('2nd test', () => {
})
it('3rd test', () => {
})
})
context('2nd suite', () => {
it('first test', () => {
})
it('2nd test', () => {
})
it('3rd test', () => {
})
})
() => we are declaring call back function, A callback is a function passed as an argument to another function.