stability-editing
This commit is contained in:
parent
1832362fb9
commit
a880fe81e5
|
@ -13,6 +13,10 @@ type checking with watch
|
||||||
```
|
```
|
||||||
npm run typecheck:watch
|
npm run typecheck:watch
|
||||||
```
|
```
|
||||||
|
fix styles, imports, formatting and autofixable linting errors:
|
||||||
|
```
|
||||||
|
npm run fix
|
||||||
|
```
|
||||||
## Code generation
|
## Code generation
|
||||||
|
|
||||||
generate new SolidJS component:
|
generate new SolidJS component:
|
||||||
|
|
|
@ -22,5 +22,3 @@ export const <%= h.changeCase.pascal(name) %>Provider = (props: { children: JSX.
|
||||||
|
|
||||||
return <<%= h.changeCase.pascal(name) %>Context.Provider value={value}>{props.children}</<%= h.changeCase.pascal(name) %>Context.Provider>
|
return <<%= h.changeCase.pascal(name) %>Context.Provider value={value}>{props.children}</<%= h.changeCase.pascal(name) %>Context.Provider>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
1112
package-lock.json
generated
1112
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -50,15 +50,15 @@
|
||||||
"@graphql-codegen/typescript-operations": "4.0.1",
|
"@graphql-codegen/typescript-operations": "4.0.1",
|
||||||
"@graphql-codegen/typescript-urql": "4.0.0",
|
"@graphql-codegen/typescript-urql": "4.0.0",
|
||||||
"@graphql-codegen/urql-introspection": "3.0.0",
|
"@graphql-codegen/urql-introspection": "3.0.0",
|
||||||
"@graphql-tools/url-loader": "7.17.18",
|
"@graphql-tools/url-loader": "8.0.1",
|
||||||
"@graphql-typed-document-node/core": "3.2.0",
|
"@graphql-typed-document-node/core": "3.2.0",
|
||||||
"@hocuspocus/provider": "2.0.6",
|
"@hocuspocus/provider": "2.0.6",
|
||||||
"@microsoft/fetch-event-source": "^2.0.1",
|
"@microsoft/fetch-event-source": "^2.0.1",
|
||||||
"@nanostores/router": "0.11.0",
|
"@nanostores/router": "0.13.0",
|
||||||
"@nanostores/solid": "0.4.2",
|
"@nanostores/solid": "0.4.2",
|
||||||
"@playwright/test": "1.41.2",
|
"@playwright/test": "1.41.2",
|
||||||
"@popperjs/core": "2.11.8",
|
"@popperjs/core": "2.11.8",
|
||||||
"@sentry/browser": "5.30.0",
|
"@sentry/browser": "7.99.0",
|
||||||
"@solid-primitives/media": "2.2.3",
|
"@solid-primitives/media": "2.2.3",
|
||||||
"@solid-primitives/memo": "1.2.4",
|
"@solid-primitives/memo": "1.2.4",
|
||||||
"@solid-primitives/share": "2.0.4",
|
"@solid-primitives/share": "2.0.4",
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
"@tiptap/extension-youtube": "2.0.3",
|
"@tiptap/extension-youtube": "2.0.3",
|
||||||
"@types/js-cookie": "3.0.6",
|
"@types/js-cookie": "3.0.6",
|
||||||
"@types/node": "20.9.0",
|
"@types/node": "20.9.0",
|
||||||
"@urql/core": "3.2.2",
|
"@urql/core": "4.2.3",
|
||||||
"@urql/devtools": "2.0.3",
|
"@urql/devtools": "2.0.3",
|
||||||
"babel-preset-solid": "1.8.4",
|
"babel-preset-solid": "1.8.4",
|
||||||
"bootstrap": "5.3.2",
|
"bootstrap": "5.3.2",
|
||||||
|
|
|
@ -326,8 +326,8 @@ export const FullArticle = (props: Props) => {
|
||||||
const cover = props.article.cover ?? 'production/image/logo_image.png'
|
const cover = props.article.cover ?? 'production/image/logo_image.png'
|
||||||
const ogImage = getOpenGraphImageUrl(cover, {
|
const ogImage = getOpenGraphImageUrl(cover, {
|
||||||
title: props.article.title,
|
title: props.article.title,
|
||||||
topic: mainTopic().title,
|
topic: mainTopic()?.title || '',
|
||||||
author: props.article.authors[0].name,
|
author: props.article?.authors[0]?.name || '',
|
||||||
width: 1200,
|
width: 1200,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -207,8 +207,12 @@ export const EditorProvider = (props: { children: JSX.Element }) => {
|
||||||
shout_id,
|
shout_id,
|
||||||
publish: true,
|
publish: true,
|
||||||
})
|
})
|
||||||
|
if (newShout) {
|
||||||
addArticles([newShout])
|
addArticles([newShout])
|
||||||
openPage(router, 'feed')
|
openPage(router, 'feed')
|
||||||
|
} else {
|
||||||
|
console.error('[publishShoutById] no shout returned:', newShout)
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[publishShoutById]', error)
|
console.error('[publishShoutById]', error)
|
||||||
showSnackbar({ type: 'error', body: t('Error') })
|
showSnackbar({ type: 'error', body: t('Error') })
|
||||||
|
|
37
tests/basic-routes.test.js
Normal file
37
tests/basic-routes.test.js
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
import { chromium } from 'playwright'
|
||||||
|
;(async () => {
|
||||||
|
const browser = await chromium.launch()
|
||||||
|
const context = await browser.newContext()
|
||||||
|
|
||||||
|
// Define the URLs to visit
|
||||||
|
const pagesToVisit = [
|
||||||
|
'http://localhost:3000/',
|
||||||
|
'http://localhost:3000/feed',
|
||||||
|
'http://localhost:3000/create',
|
||||||
|
'http://localhost:3000/about/donate',
|
||||||
|
'http://localhost:3000/authors',
|
||||||
|
'http://localhost:3000/topics',
|
||||||
|
'http://localhost:3000/inbox',
|
||||||
|
]
|
||||||
|
|
||||||
|
// Loop through the pages and visit each one
|
||||||
|
for (const pageUrl of pagesToVisit) {
|
||||||
|
const page = await context.newPage()
|
||||||
|
|
||||||
|
// Log a message before visiting the page
|
||||||
|
console.log(`Visiting page: ${pageUrl}`)
|
||||||
|
|
||||||
|
await page.goto(pageUrl)
|
||||||
|
|
||||||
|
// Add your test assertions here if needed
|
||||||
|
|
||||||
|
// Log a message after visiting the page
|
||||||
|
console.log(`Finished visiting page: ${pageUrl}`)
|
||||||
|
|
||||||
|
// Close the page before moving to the next one
|
||||||
|
await page.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close the browser
|
||||||
|
await browser.close()
|
||||||
|
})()
|
Loading…
Reference in New Issue
Block a user