MCPcopy
hub / github.com/blitz-js/blitz / runTests

Function runTests

integration-tests/react-query-utils/test/index.test.ts:15–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13let appPort: number
14
15const runTests = () => {
16 describe("get query data", () => {
17 it(
18 "should work",
19 async () => {
20 const browser = await webdriver(appPort, "/page-with-get-query-data")
21
22 browser.waitForElementByCss("#button", 0)
23 await browser.elementByCss("#button").click()
24
25 browser.waitForElementByCss("#new-data", 0)
26 const newText = await browser.elementByCss("#new-data").text()
27 expect(newText).toMatch(/basic-result/)
28
29 if (browser) await browser.close()
30 },
31 5000 * 60 * 2,
32 )
33 })
34
35 describe("get query data from monorepo", () => {
36 it(
37 "should work",
38 async () => {
39 const browser = await webdriver(appPort, "/page-with-monorepo-query")
40
41 browser.waitForElementByCss("#button", 0)
42 await browser.elementByCss("#button").click()
43
44 browser.waitForElementByCss("#new-data", 0)
45 const newText = await browser.elementByCss("#new-data").text()
46 expect(newText).toMatch(/basic-result/)
47
48 if (browser) await browser.close()
49 },
50 5000 * 60 * 2,
51 )
52 })
53
54 // describe("prefetch infinite query", () => {
55 // it(
56 // "should work",
57 // async () => {
58 // const browser = await webdriver(appPort, "/page-with-prefetch-inf-query")
59
60 // browser.waitForElementByCss("#data", 0)
61 // const newText = await browser.elementByCss("#data").text()
62 // expect(newText).not.toMatch("no-data")
63 // expect(newText).toMatch("thanks")
64
65 // if (browser) await browser.close()
66 // },
67 // 5000 * 60 * 2,
68 // )
69 // })
70
71 describe("invalidate query", () => {
72 it(

Callers 1

index.test.tsFile · 0.70

Calls 7

webdriverFunction · 0.85
getDataFunction · 0.85
waitForElementByCssMethod · 0.45
clickMethod · 0.45
elementByCssMethod · 0.45
textMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected