Skip to content

Commit

Permalink
fix noDesktop
Browse files Browse the repository at this point in the history
  • Loading branch information
flameddd committed Feb 17, 2020
1 parent e58e668 commit 032e575
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
with:
url: https://github.com
devices: iPhone 6,iPhone 6 landscape,Nexus 7,Pad Pro,Galaxy S III landscape,iPad Pro landscape
- run: ls -l ./screenshots
- uses: actions/upload-artifact@v1
with:
name: Download-screenshots
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function run() {
const url = core.getInput("url") || "";
const isAllDevices = core.getInput("allDevices") || false;
let includedDevices = core.getInput("devices");
const noDesktop = !!core.getInput("noDesktop");
const noDesktop = core.getInput("noDesktop") === true;

core.startGroup('Action config')
console.log('Input args:', {
Expand Down Expand Up @@ -82,7 +82,7 @@ async function run() {
? `${process.env.GITHUB_SHA}`.substr(0, 7)
: `${new Date().getTime()}`

// if (!noDesktop) {
if (!noDesktop) {
core.startGroup("start process desktop")
console.log("Processing desktop screenshot")
await desktopPage.goto(url, { waitUntil: 'networkidle0' });
Expand All @@ -93,12 +93,11 @@ async function run() {
});
}
core.endGroup() // end start process desktop
// }
}

if (includedDevices.length) {
core.startGroup("start process mobile devices");
console.log("Processing mobile devices screenshot")
console.log(includedDevices)
const mobilePages = await Promise.all([
...Array.from({ length: includedDevices.length }).fill(browser.newPage()),
]);
Expand Down

0 comments on commit 032e575

Please sign in to comment.