forked from DeFiCh/defichain.com
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdfi.spec.ts
More file actions
145 lines (129 loc) · 5.06 KB
/
Copy pathdfi.spec.ts
File metadata and controls
145 lines (129 loc) · 5.06 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
context("/dfi page on desktop", () => {
before(() => {
cy.visit("/dfi");
});
beforeEach(() => {
cy.viewport("macbook-16");
cy.interceptGeckoApi();
});
it("should have Header", () => {
cy.findByTestId("Header.title").should("have.text", "$DFI");
cy.findByTestId("Header.desc.main").should(
"have.text",
"Learn about and acquire the $DFI coin",
);
});
it("should have DFICoinSection", () => {
cy.findByTestId("DFICoinSection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "$DFI coin");
cy.findByTestId("DfiPage.Section.Text").should("be.visible");
cy.findByTestId("DfiPage.Section.Note").should("be.visible");
});
});
it("should UtilitySection", () => {
cy.findByTestId("UtilitySection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "$DFI coin utility");
cy.findByTestId("UtilitySection.Fees").should("be.visible");
cy.findByTestId("UtilitySection.Nodes").should("be.visible");
cy.findByTestId("UtilitySection.Collateral").should("be.visible");
cy.findByTestId("UtilitySection.Token").should("be.visible");
cy.findByTestId("UtilitySection.Proposal").should("be.visible");
cy.findByTestId("UtilitySection.Pools").should("be.visible");
});
});
it("should have DistributionSection", () => {
cy.findByTestId("DistributionSection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "Initial Token Distribution");
cy.findByTestId("DistributionSection.Text").should("be.visible");
cy.findByTestId("DistributionSection.Chart").should("be.visible");
});
});
it("should have Acquiring section", () => {
cy.findByTestId("ExchangeSection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "Acquiring $DFI coins");
cy.findByTestId("ExchangeSection.Desc").should("be.visible");
cy.findByTestId("ExchangeSection.Heading")
.should("be.visible")
.should("have.text", "Exchanges");
cy.findByTestId("ExchangeSection.Text").should("be.visible");
cy.findByTestId("ExchangeSection.Bittrue").should("be.visible");
cy.findByTestId("DfiPage.Staking.Heading")
.should("be.visible")
.should("have.text", "Staking");
cy.findByTestId("DfiPage.Staking.Text").should("be.visible");
cy.findByTestId("DfiPage.Staking.Lock").should("be.visible");
});
});
});
context("/dfi page on mobile", () => {
before(() => {
cy.visit("/dfi");
});
beforeEach(() => {
cy.viewport("iphone-x");
cy.interceptGeckoApi();
});
it("should have Header", () => {
cy.findByTestId("Header.title").should("have.text", "$DFI");
cy.findByTestId("Header.desc.main").should(
"have.text",
"Learn about and acquire the $DFI coin",
);
});
it("should have DFICoinSection", () => {
cy.findByTestId("DFICoinSection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "$DFI coin");
cy.findByTestId("DfiPage.Section.Text").should("be.visible");
cy.findByTestId("DfiPage.Section.Note").should("be.visible");
});
});
it("should UtilitySection", () => {
cy.findByTestId("UtilitySection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "$DFI coin utility");
cy.findByTestId("UtilitySection.Fees").should("be.visible");
cy.findByTestId("UtilitySection.Nodes").should("be.visible");
cy.findByTestId("UtilitySection.Collateral").should("be.visible");
cy.findByTestId("UtilitySection.Token").should("be.visible");
cy.findByTestId("UtilitySection.Proposal").should("be.visible");
cy.findByTestId("UtilitySection.Pools").should("be.visible");
});
});
it("should have DistributionSection", () => {
cy.findByTestId("DistributionSection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "Initial Token Distribution");
cy.findByTestId("DistributionSection.Text").should("be.visible");
cy.findByTestId("DistributionSection.Chart").should("be.visible");
});
});
it("should have Acquiring section", () => {
cy.findByTestId("ExchangeSection").within(() => {
cy.findByTestId("Section.Title")
.should("be.visible")
.should("have.text", "Acquiring $DFI coins");
cy.findByTestId("ExchangeSection.Desc").should("be.visible");
cy.findByTestId("ExchangeSection.Heading")
.should("be.visible")
.should("have.text", "Exchanges");
cy.findByTestId("ExchangeSection.Text").should("be.visible");
cy.findByTestId("ExchangeSection.Bittrue").should("be.visible");
cy.findByTestId("DfiPage.Staking.Heading")
.should("be.visible")
.should("have.text", "Staking");
cy.findByTestId("DfiPage.Staking.Text").should("be.visible");
});
});
});