Skip to content

Commit 4255905

Browse files
committed
more work on transition tests
1 parent 6b3186a commit 4255905

File tree

2 files changed

+71
-69
lines changed

2 files changed

+71
-69
lines changed

e2e/solid-router/basic-file-based/tests/transition.spec.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('transitions/count/create-resource should keep old values visible during na
2020

2121
// 1 click
2222

23-
await page.getByTestId('increase-button').click()
23+
page.getByTestId('increase-button').click()
2424

2525
await expect(page.getByTestId('n-value')).toContainText('n: 1', {
2626
timeout: 2_000,
@@ -38,48 +38,48 @@ test('transitions/count/create-resource should keep old values visible during na
3838
timeout: 2000,
3939
})
4040

41-
// // 2 clicks
41+
// 2 clicks
4242

43-
// await page.getByTestId('increase-button').click()
44-
// await page.getByTestId('increase-button').click()
43+
page.getByTestId('increase-button').click()
44+
page.getByTestId('increase-button').click()
4545

46-
// await expect(page.getByTestId('n-value')).toContainText('n: 2', {
47-
// timeout: 2000,
48-
// })
49-
// await expect(page.getByTestId('double-value')).toContainText('double: 4', {
50-
// timeout: 2000,
51-
// })
46+
await expect(page.getByTestId('n-value')).toContainText('n: 2', {
47+
timeout: 2000,
48+
})
49+
await expect(page.getByTestId('double-value')).toContainText('double: 4', {
50+
timeout: 2000,
51+
})
5252

53-
// await page.waitForTimeout(200)
53+
await page.waitForTimeout(200)
5454

55-
// await expect(page.getByTestId('n-value')).toContainText('n: 4', {
56-
// timeout: 2000,
57-
// })
58-
// await expect(page.getByTestId('double-value')).toContainText('double: 8', {
59-
// timeout: 2000,
60-
// })
55+
await expect(page.getByTestId('n-value')).toContainText('n: 4', {
56+
timeout: 2000,
57+
})
58+
await expect(page.getByTestId('double-value')).toContainText('double: 8', {
59+
timeout: 2000,
60+
})
6161

62-
// // 3 clicks
62+
// 3 clicks
6363

64-
// await page.getByTestId('increase-button').click()
65-
// await page.getByTestId('increase-button').click()
66-
// await page.getByTestId('increase-button').click()
64+
page.getByTestId('increase-button').click()
65+
page.getByTestId('increase-button').click()
66+
page.getByTestId('increase-button').click()
6767

68-
// await expect(page.getByTestId('n-value')).toContainText('n: 4', {
69-
// timeout: 2000,
70-
// })
71-
// await expect(page.getByTestId('double-value')).toContainText('double: 8', {
72-
// timeout: 2000,
73-
// })
68+
await expect(page.getByTestId('n-value')).toContainText('n: 4', {
69+
timeout: 2000,
70+
})
71+
await expect(page.getByTestId('double-value')).toContainText('double: 8', {
72+
timeout: 2000,
73+
})
7474

75-
// await page.waitForTimeout(200)
75+
await page.waitForTimeout(200)
7676

77-
// await expect(page.getByTestId('n-value')).toContainText('n: 7', {
78-
// timeout: 2000,
79-
// })
80-
// await expect(page.getByTestId('double-value')).toContainText('double: 14', {
81-
// timeout: 2000,
82-
// })
77+
await expect(page.getByTestId('n-value')).toContainText('n: 7', {
78+
timeout: 2000,
79+
})
80+
await expect(page.getByTestId('double-value')).toContainText('double: 14', {
81+
timeout: 2000,
82+
})
8383

8484
clearInterval(pollInterval)
8585

e2e/solid-start/basic/tests/transition.spec.ts

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('transitions/count/create-resource should keep old values visible during na
2020

2121
// 1 click
2222

23-
await page.getByTestId('increase-button').click()
23+
page.getByTestId('increase-button').click()
2424

2525
await expect(page.getByTestId('n-value')).toContainText('n: 1', {
2626
timeout: 2_000,
@@ -38,48 +38,50 @@ test('transitions/count/create-resource should keep old values visible during na
3838
timeout: 2000,
3939
})
4040

41+
// TODO - the below tests should be possible to uncomment
42+
4143
// 2 clicks
4244

43-
await page.getByTestId('increase-button').click()
44-
await page.getByTestId('increase-button').click()
45+
// page.getByTestId('increase-button').click()
46+
// page.getByTestId('increase-button').click()
4547

46-
await expect(page.getByTestId('n-value')).toContainText('n: 2', {
47-
timeout: 2000,
48-
})
49-
await expect(page.getByTestId('double-value')).toContainText('double: 4', {
50-
timeout: 2000,
51-
})
48+
// await expect(page.getByTestId('n-value')).toContainText('n: 2', {
49+
// timeout: 2000,
50+
// })
51+
// await expect(page.getByTestId('double-value')).toContainText('double: 4', {
52+
// timeout: 2000,
53+
// })
5254

53-
await page.waitForTimeout(200)
55+
// await page.waitForTimeout(200)
5456

55-
await expect(page.getByTestId('n-value')).toContainText('n: 4', {
56-
timeout: 2000,
57-
})
58-
await expect(page.getByTestId('double-value')).toContainText('double: 8', {
59-
timeout: 2000,
60-
})
57+
// await expect(page.getByTestId('n-value')).toContainText('n: 4', {
58+
// timeout: 2000,
59+
// })
60+
// await expect(page.getByTestId('double-value')).toContainText('double: 8', {
61+
// timeout: 2000,
62+
// })
6163

6264
// 3 clicks
6365

64-
await page.getByTestId('increase-button').click()
65-
await page.getByTestId('increase-button').click()
66-
await page.getByTestId('increase-button').click()
67-
68-
await expect(page.getByTestId('n-value')).toContainText('n: 4', {
69-
timeout: 2000,
70-
})
71-
await expect(page.getByTestId('double-value')).toContainText('double: 8', {
72-
timeout: 2000,
73-
})
74-
75-
await page.waitForTimeout(200)
76-
77-
await expect(page.getByTestId('n-value')).toContainText('n: 7', {
78-
timeout: 2000,
79-
})
80-
await expect(page.getByTestId('double-value')).toContainText('double: 14', {
81-
timeout: 2000,
82-
})
66+
// page.getByTestId('increase-button').click()
67+
// page.getByTestId('increase-button').click()
68+
// page.getByTestId('increase-button').click()
69+
70+
// await expect(page.getByTestId('n-value')).toContainText('n: 4', {
71+
// timeout: 2000,
72+
// })
73+
// await expect(page.getByTestId('double-value')).toContainText('double: 8', {
74+
// timeout: 2000,
75+
// })
76+
77+
// await page.waitForTimeout(200)
78+
79+
// await expect(page.getByTestId('n-value')).toContainText('n: 7', {
80+
// timeout: 2000,
81+
// })
82+
// await expect(page.getByTestId('double-value')).toContainText('double: 14', {
83+
// timeout: 2000,
84+
// })
8385

8486
clearInterval(pollInterval)
8587

0 commit comments

Comments
 (0)