fix: support using create-cypress-tests as part of build process (#18714)

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
This commit is contained in:
Lachlan Miller
2021-11-02 02:19:22 +10:00
committed by GitHub
parent a064d1c7d8
commit 0501452fb9
8 changed files with 38 additions and 7 deletions

View File

@@ -350,13 +350,27 @@ require('./packages/server')\
const runSmokeTests = function () {
log('#runSmokeTests')
const run = function () {
const run = async function () {
// make sure to use a longer timeout - on Mac the first
// launch of a built application invokes gatekeeper check
// which takes a couple of seconds
const executablePath = meta.buildAppExecutable(platform)
return smoke.test(executablePath)
// Moving this package specifically to simulate a failing scenario for
// https://github.com/cypress-io/cypress/pull/18714
await fse.move(
path.join(process.cwd(), 'node_modules/create-cypress-tests'),
path.join(process.cwd(), 'node_modules/_create-cypress-tests'),
)
try {
return await smoke.test(executablePath)
} finally {
await fse.move(
path.join(process.cwd(), 'node_modules/_create-cypress-tests'),
path.join(process.cwd(), 'node_modules/create-cypress-tests'),
)
}
}
if (xvfb.isNeeded()) {

View File

@@ -73,7 +73,7 @@ const checkZipSize = function (zipPath) {
const zipSize = filesize(stats.size, { round: 0 })
console.log(`zip file size ${zipSize}`)
const MAX_ALLOWED_SIZE_MB = os.platform() === 'win32' ? 295 : 260
const MAX_ALLOWED_SIZE_MB = os.platform() === 'win32' ? 295 : 300
const MAX_ZIP_FILE_SIZE = megaBytes(MAX_ALLOWED_SIZE_MB)
if (stats.size > MAX_ZIP_FILE_SIZE) {