forked from arashidkargo/Deal_Alert_UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeal_alert_spec.js
117 lines (46 loc) · 2.02 KB
/
deal_alert_spec.js
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
const usrName='[email protected]'
const usrPassoword='K@rgo123!'
const dev='http://deal-alerts.dev.kargo.com/alerts'
const stg='http://deal-alerts.dev.kargo.com/alerts'
const prod='http://deal-alerts.dev.kargo.com/alerts'
const auth= 'auth_key'
const auth_value='Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJjcmVhdGl2ZS1zbmlwcGV0LnByb2Qua2FyZ28uY29tIiwiZXhwIjozMDU5ODU2MDAwMDAwLCJpc3N1ZWQiOjE0ODMxMTY5NTE4NzQsInR5cGUiOiJhY2Nlc3NfdG9rZW4iLCJjaWQiOiJzZXJ2aWNlIiwiYXBwTmFtZSI6ImNyZWF0aXZlLXNuaXBwZXQifQ.Zg-VXZQfoKbd98uFEuzNE13lDKzIsGj-d2YLhJ1wVVzO_samxBq4pIjWhSy6jCaDJ1D1oCzyKyJy2SErfSvKmhS5qr6jpwxYmiq3nPDpYB0v8fIAD6-6YFNZ0zUX165-Q1cJEXY8dvzx--p1NBVQQyWRQ_yCLHeSw3T9-71LTIxxmR22zllwOmLIml_K01S9P05y48V85r9k9Y4kBESfv86rmv6gI5zc9GljfZ5FuveMdzCPZhmCiz3WUwCUUaBxQ75FU8hk8QzwDeOzRv3tzWco06w9-xL9Xezg20D5onfOFgwafeyujGPdpVIFWAmIFXZQytRIJO1xl2YhUv43bQ'
describe('Deal Alert UI Integration Test', function()
{
it('Navigating to Deal Alert Page', function()
{
cy.visit(dev)
})
it('Verify Login Page ', function()
{
cy.contains('Sign In')
})
it('Verify User is able to Login to the deal-alert site ', function()
{
cy.get('input[name="username"]').type(usrName).should('have.value', usrName )
cy.get('input[name="password"]').type(usrPassoword).should('have.value', usrPassoword)
cy.get('button').click()
cy.setCookie(auth,auth_value)
})
it('Deal Alert Dashboard', function()
{
cy.contains('Deal Alerts Dashboard')
cy.setCookie(auth,auth_value)
})
it('Verify URL Should have /alerts ', function()
{
cy.url()
.should('include', '/alerts')
cy.request(dev).then((response) => {
expect(response.status).to.eq(200)
})
cy.setCookie(auth,auth_value)
})
it('Click on a Alert', function()
{
cy.setCookie(auth,auth_value)
cy.get(':nth-child(2) > a > .table-link > span').click()
///cy.screenshot(Deal_alert_UI)
cy.get('.breadcrumb--icon-only').click()
})
})