Skip to content

Commit dad98b2

Browse files
committed
test: basic tests
1 parent 9df94db commit dad98b2

File tree

2 files changed

+49
-11
lines changed

2 files changed

+49
-11
lines changed
Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,62 @@
1+
12
describe('testing test', () => {
2-
it.only('should fix geo data', () => {
3-
cy.visitTest('Geo', 'Circle Markers')
3+
it('should make Gauge snapshot', () => {
4+
cy.visitTest('Gauge', 'Gauge')
45
cy.inputKnobs('Fixed data', true, 'boolean')
56
})
67

7-
it('should make snapsot of band chart', () => {
8-
cy.visitTest('Band Chart', 'Static: groupBy applied')
9-
cy.inputKnobs('Time Format', 'HH:mm', 'select')
8+
it('should make snapshot of gauge', () => {
9+
cy.visitTest('Gauge', 'Gauge')
10+
cy.inputKnobs('Fixed data', true, 'boolean')
11+
cy.inputKnobs('Gauge Lines', 12, 'number')
12+
cy.wait(4000)
13+
cy.inputKnobs('Ticks between lines', 3, 'number')
14+
15+
cy.snapshotComponent('gauge-test-3-ticks-between-lines-12-gauge-lines')
16+
17+
cy.inputKnobs('Gauge Min', 10, 'number')
18+
19+
cy.inputKnobs('Prefix', 'haf ', 'text')
20+
cy.wait(2000)
21+
22+
cy.snapshotComponent('gauge-test-Haf-prefix-10-gauge-min')
1023
})
1124

1225
it('should make snapshot of gauge', () => {
1326
cy.visitTest('Gauge', 'Gauge')
27+
cy.inputKnobs('Fixed data', true, 'boolean')
28+
29+
cy.inputKnobs('Ticks between lines', 3, 'number')
1430

15-
cy.snapshotComponent('gauge-test-1')
31+
cy.snapshotComponent('gauge-test-3-ticks-between-lines')
32+
cy.wait(2000)
1633

17-
cy.inputKnobs('Decimal Places', 2, 'number')
34+
cy.inputKnobs('Gauge Max', 23, 'number')
35+
cy.inputKnobs('Suffix', 'HKS', 'text')
36+
cy.wait(2000)
37+
cy.inputKnobs('Suffix', 'halsper ', 'text')
1838

19-
cy.snapshotComponent('gauge-test-2-decimal-places')
39+
cy.snapshotComponent('gauge-test-suffix-prefix-type')
2040

21-
cy.inputKnobs('Gauge Min', 20, 'number')
2241

23-
cy.snapshotComponent('gauge-test-start-20')
2442
})
25-
})
43+
44+
it('should make snapchot of gauge', () => {
45+
cy.visitTest('Gauge', 'Gauge')
46+
cy.inputKnobs('Fixed data', true, 'boolean')
47+
48+
cy.inputKnobs('Decimal Places', 1, 'number')
49+
cy.wait(3000)
50+
51+
cy.inputKnobs('Gauge Lines', 1, 'number')
52+
cy.inputKnobs('Ticks between lines', 39, 'number')
53+
54+
cy.inputKnobs('TickPrefix', 'kdfakdhj', 'text')
55+
cy.snapshotComponent('gauge-test-tick-prefix')
56+
57+
cy.inputKnobs('TickPrefix', ' ', 'text')
58+
cy.inputKnobs('TickSuffix', 'kdkdhj', 'text')
59+
cy.snapshotComponent('gaure-test-ticksSuffix')
60+
}
61+
)
62+
})

stories/cypress/support/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const snapshotComponent = (
6969

7070
export const inputKnobs: {
7171
(label: string, value: string): void
72+
(label: string, value: string, type: 'text'): void
7273
(label: string, value: string, type: 'select'): void
7374
(label: string, value: number, type: 'number'): void
7475
(label: string, value: boolean, type: 'boolean'): void

0 commit comments

Comments
 (0)