Merge branch 'develop' into cache-sessions

# Conflicts:
#	packages/driver/src/cy/commands/sessions/index.ts
This commit is contained in:
Emily Rohrbough
2022-08-16 13:22:27 -05:00
87 changed files with 1361 additions and 292 deletions
+4
View File
@@ -45,6 +45,10 @@ exports['desktop url from template'] = `
https://download.cypress.io/desktop/0.20.2/OS-ARCH/cypress.zip
`
exports['desktop url from template with version'] = `
https://mycompany/0.20.2/OS-ARCH/cypress.zip
`
exports['desktop url from template with escaped dollar sign'] = `
https://download.cypress.io/desktop/0.20.2/OS-ARCH/cypress.zip
`
+5 -2
View File
@@ -60,7 +60,7 @@ const getCA = () => {
})
}
const prepend = (arch, urlPath) => {
const prepend = (arch, urlPath, version) => {
const endpoint = url.resolve(getBaseUrl(), urlPath)
const platform = os.platform()
const pathTemplate = util.getEnv('CYPRESS_DOWNLOAD_PATH_TEMPLATE', true)
@@ -71,6 +71,7 @@ const prepend = (arch, urlPath) => {
.replace(/\\?\$\{endpoint\}/, endpoint)
.replace(/\\?\$\{platform\}/, platform)
.replace(/\\?\$\{arch\}/, arch)
.replace(/\\?\$\{version\}/, version)
)
: `${endpoint}?platform=${platform}&arch=${arch}`
}
@@ -82,7 +83,9 @@ const getUrl = (arch, version) => {
return version
}
return version ? prepend(arch, `desktop/${version}`) : prepend(arch, 'desktop')
const urlPath = version ? `desktop/${version}` : 'desktop'
return prepend(arch, urlPath, version)
}
const statusMessage = (err) => {
+7
View File
@@ -74,6 +74,13 @@ describe('lib/tasks/download', function () {
snapshot('desktop url from template', normalize(url))
})
it('returns custom url from template with version', () => {
process.env.CYPRESS_DOWNLOAD_PATH_TEMPLATE = 'https://mycompany/${version}/${platform}-${arch}/cypress.zip'
const url = download.getUrl('ARCH', '0.20.2')
snapshot('desktop url from template with version', normalize(url))
})
it('returns custom url from template with escaped dollar sign', () => {
process.env.CYPRESS_DOWNLOAD_PATH_TEMPLATE = '\\${endpoint}/\\${platform}-\\${arch}/cypress.zip'
const url = download.getUrl('ARCH', '0.20.2')
+5
View File
@@ -3063,6 +3063,11 @@ declare namespace Cypress {
interface ComponentConfigOptions<ComponentDevServerOpts = any> extends Omit<CoreConfigOptions, 'baseUrl' | 'experimentalSessionAndOrigin'> {
devServer: DevServerFn<ComponentDevServerOpts> | DevServerConfigOptions
devServerConfig?: ComponentDevServerOpts
/**
* Runs all component specs in a single tab, trading spec isolation for faster run mode execution.
* @default false
*/
experimentalSingleTabRunMode?: boolean
}
/**