Skip to content

Commit 98a42fb

Browse files
authored
refactor: resize screenshot for Chrome Web Store (#172)
* refactor: resize screenshot for Chrome Web Store * Fix image name
1 parent 68702fc commit 98a42fb

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/cypress.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ jobs:
3737
- uses: int128/comment-action@v1
3838
with:
3939
post: |
40-
<img width="800" src="${{ steps.upload-artifact-wiki.outputs.url }}/cypress/screenshots/App.cy.tsx/App%20--%20mounts.png">
41-
42-
<img width="800" src="${{ steps.upload-artifact-wiki.outputs.url }}/cypress/screenshots/App.cy.tsx/App%20--%20opens%20the%20bookmark%20editor.png">
40+
<table>
41+
<tr>
42+
<td><img src="${{ steps.upload-artifact-wiki.outputs.url }}/cypress/screenshots/App.cy.tsx/App%20--%20mounts.png"></td>
43+
<td><img src="${{ steps.upload-artifact-wiki.outputs.url }}/cypress/screenshots/App.cy.tsx/App%20--%20enables%20dark%20mode.png"></td>
44+
</tr>
45+
<tr>
46+
<td><img src="${{ steps.upload-artifact-wiki.outputs.url }}/cypress/screenshots/App.cy.tsx/App%20--%20opens%20the%20bookmark%20editor.png"></td>
47+
<td></td>
48+
</tr>
49+
</table>

cypress.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'cypress'
22

3-
const width = 1200
4-
const height = width * (9 / 16)
3+
const width = 1280
4+
const height = 800
55

66
export default defineConfig({
77
component: {
@@ -17,7 +17,7 @@ export default defineConfig({
1717
// https://www.cypress.io/blog/2021/03/01/generate-high-resolution-videos-and-screenshots/
1818
if (browser.name === 'chrome' && browser.isHeadless) {
1919
launchOptions.args.push(`--window-size=${width},${height}`)
20-
launchOptions.args.push('--force-device-scale-factor=2')
20+
launchOptions.args.push('--force-device-scale-factor=1')
2121
}
2222
return launchOptions
2323
})

0 commit comments

Comments
 (0)