refactor: test
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
"build:services": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/services run build",
|
"build:services": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/services run build",
|
||||||
"build:api": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/api run build",
|
"build:api": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/api run build",
|
||||||
"e2e": "lerna run start:test-server --scope=@standardnotes/snjs",
|
"e2e": "lerna run start:test-server --scope=@standardnotes/snjs",
|
||||||
|
"e2e:test": "yarn dlx mocha-headless-chrome --timeout 1800000 -f http://localhost:9001/mocha/test.html",
|
||||||
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
|
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
|
||||||
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"",
|
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"",
|
||||||
"publish:prod": "lerna publish from-git --yes --no-verify-access --loglevel verbose",
|
"publish:prod": "lerna publish from-git --yes --no-verify-access --loglevel verbose",
|
||||||
|
|||||||
@@ -693,21 +693,21 @@ export class AppContext {
|
|||||||
payAmount: 59.0,
|
payAmount: 59.0,
|
||||||
})
|
})
|
||||||
|
|
||||||
await Utils.sleep(2)
|
await Utils.sleep(2, 'Waiting for premium features to be activated')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`Mock events service not available. You are probably running a test suite for home server: ${error.message}`,
|
`Mock events service not available. You are probably running a test suite for home server: ${error.message}`,
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await HomeServer.activatePremiumFeatures(this.email, options.subscriptionPlanName, options.expiresAt)
|
await HomeServer.activatePremiumFeatures(this.email, options.subscriptionPlanName, options.expiresAt)
|
||||||
|
|
||||||
await Utils.sleep(1, 'Waiting for premium features to be activated')
|
await Utils.sleep(1, 'Waiting for premium features to be activated')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`Home server not available. You are probably running a test suite for self hosted setup: ${error.message}`,
|
`Home server not available. You are probably running a test suite for self hosted setup: ${error.message}`,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user