-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForgetPassword.cy.js
More file actions
58 lines (52 loc) · 1.78 KB
/
ForgetPassword.cy.js
File metadata and controls
58 lines (52 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/// <reference types="cypress" />
const screenSizes = [
'ipad-2',
'ipad-mini',
'iphone-3',
'iphone-4',
'iphone-5',
'iphone-6',
'iphone-6+',
'iphone-7',
'iphone-8',
'iphone-x',
'iphone-xr',
'iphone-se2',
'macbook-11',
'macbook-13',
'macbook-15',
'macbook-16',
'samsung-note9',
'samsung-s10'
];
describe('Test Forget Password Functionality on Different Screen', () => {
screenSizes.forEach((screensize) => {
it(`Checking Functionality of forget password button on login screen on ${screensize}`, () => {
cy.visit('https://bsm-admin-abnj.vercel.app/')
cy.get('.border-b-\[1px\]').click()
cy.visit('https://bsm-admin-abnj.vercel.app/forgetpasswordpage')
cy.find('Reset Password')
} )
it(`Valid Reset Password on ${screensize}`, () => {
cy.visit('https://bsm-admin-abnj.vercel.app/forgetpasswordpage')
cy.contains('Reset').should('be.visible')
cy.get('#email').type('eayzay001@gmail.com')
cy.get(':nth-child(3) > .flex').click()
cy.wait(5000)
cy.get('.underline').click()
cy.contains('Login').should('be.visible')
cy.wait(5000)
})
it(`InValid Reset Password on ${screensize}`, () => {
cy.visit('https://bsm-admin-abnj.vercel.app/forgetpasswordpage')
cy.contains('Reset').should('be.visible')
cy.get('#email').type('eayzay0011@gmail.com')
cy.get(':nth-child(3) > .flex').click()
cy.contains('does not exist').should('be.visible')
cy.wait(5000)
cy.get('.underline').click()
cy.contains('Login').should('be.visible')
cy.wait(5000)
})
})
})