File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 2121 node-version : 22
2222
2323 - name : Install Dependencies
24- run : npm i
24+ run : npm ci
2525
2626 - name : Execute Rollup Script
2727 run : npm run rollup
@@ -30,11 +30,12 @@ jobs:
3030 run : npx yalc publish
3131
3232 - name : Create Integration Project
33- run : npx create-react-app integration --template typescript
33+ run : npm create vite@latest integration -- -- template react-ts
3434
3535 - name : Use Package in Integration Project
3636 run : |
3737 cd integration
38+ npm i
3839 npx yalc add fetch-loading
3940 npm i
4041 cat package.json | grep fetch-loading || exit 1
@@ -71,18 +72,21 @@ jobs:
7172 args: ['--no-sandbox', '--disable-setuid-sandbox'],
7273 })
7374 const page = await browser.newPage()
74- await page.goto('http://localhost:3000', { waitUntil: 'networkidle0' })
75- await page.waitForSelector('div[style*="display: flex"]', { timeout: 5000 })
76- .catch(() => {
75+ try {
76+ await page.goto('http://localhost:5173', { waitUntil: 'networkidle0' })
77+ await page.waitForSelector('div[aria-label="Loading"]', { timeout: 5000 })
78+ } catch (e) {
79+ console.error('Error:', e)
7780 process.exit(1)
78- })
79- await browser.close()
81+ } finally {
82+ await browser.close()
83+ }
8084 })()
8185 EOF
8286
8387 - name : Test for FetchLoading Component
8488 run : |
8589 cd integration
86- npm start &
87- sleep 60
90+ npm run dev -- --port 5173 --host &
91+ npx wait-on http://localhost:5173 --timeout 10000
8892 node integration.mjs
You can’t perform that action at this time.
0 commit comments