Create a screenshots page that will allow us to do screenshot testing

This commit is contained in:
Andy Balaam
2022-01-06 10:49:51 +00:00
parent 211f480027
commit 65efe55677
4 changed files with 507 additions and 0 deletions
+17
View File
@@ -99,6 +99,7 @@ module.exports = (env, argv) => {
entry: {
"bundle": "./src/vector/index.ts",
"screenshots": "./src/vector/screenshots.tsx",
"mobileguide": "./src/vector/mobile_guide/index.ts",
"jitsi": "./src/vector/jitsi/index.ts",
"usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.ts",
@@ -496,6 +497,22 @@ module.exports = (env, argv) => {
},
}),
// This is our screenshots page for testing
new HtmlWebpackPlugin({
template: './src/vector/screenshots.html',
filename: 'screenshots.html',
// we inject the links ourselves via the template, because
// HtmlWebpackPlugin will screw up our formatting like the names
// of the themes and which chunks we actually care about.
inject: false,
excludeChunks: ['mobileguide', 'usercontent', 'jitsi'],
minify: false,
templateParameters: {
og_image_url: ogImageUrl,
},
}),
// This is the jitsi widget wrapper (embedded, so isolated stack)
new HtmlWebpackPlugin({
template: './src/vector/jitsi/index.html',