mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-07 07:20:42 -05:00
chore: Update Chrome (stable) to 105.0.5195.125 and Chrome (beta) to 106.0.5249.30 (#23421)
Co-authored-by: cypress-bot[bot] <2f0651858c6e38e0+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3c8114027e
commit
085bc1ebc0
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"chrome:beta": "105.0.5195.28",
|
||||
"chrome:stable": "104.0.5112.101",
|
||||
"chrome:beta": "106.0.5249.30",
|
||||
"chrome:stable": "105.0.5195.125",
|
||||
"chrome:minimum": "64.0.3282.0"
|
||||
}
|
||||
|
||||
@@ -77,13 +77,14 @@ const checkNeedForBranchUpdate = ({ core, latestStableVersion, latestBetaVersion
|
||||
}
|
||||
|
||||
const updateBrowserVersionsFile = ({ latestBetaVersion, latestStableVersion }) => {
|
||||
const versions = {
|
||||
const currentBrowserVersions = JSON.parse(fs.readFileSync('./browser-versions.json'))
|
||||
const newVersions = Object.assign(currentBrowserVersions, {
|
||||
'chrome:beta': latestBetaVersion,
|
||||
'chrome:stable': latestStableVersion,
|
||||
}
|
||||
})
|
||||
|
||||
// file path is relative to repo root
|
||||
fs.writeFileSync('./browser-versions.json', `${JSON.stringify(versions, null, 2) }\n`)
|
||||
fs.writeFileSync('./browser-versions.json', `${JSON.stringify(newVersions, null, 2) }\n`)
|
||||
}
|
||||
|
||||
const updatePRTitle = async ({ context, github, baseBranch, branchName, description }) => {
|
||||
|
||||
@@ -246,7 +246,13 @@ describe('update browser version github action', () => {
|
||||
})
|
||||
|
||||
context('.updateBrowserVersionsFile', () => {
|
||||
it('updates browser-versions.json with specified versions', () => {
|
||||
it('updates browser-versions.json with specified versions, leaving other entries in place', () => {
|
||||
sinon.stub(fs, 'readFileSync').returns(`{
|
||||
"chrome:beta": "1.1",
|
||||
"chrome:stable": "1.0",
|
||||
"chrome:other": "0.4"
|
||||
}`)
|
||||
|
||||
sinon.stub(fs, 'writeFileSync')
|
||||
|
||||
updateBrowserVersionsFile({
|
||||
@@ -256,7 +262,8 @@ describe('update browser version github action', () => {
|
||||
|
||||
expect(fs.writeFileSync).to.be.calledWith('./browser-versions.json', `{
|
||||
"chrome:beta": "2.1",
|
||||
"chrome:stable": "2.0"
|
||||
"chrome:stable": "2.0",
|
||||
"chrome:other": "0.4"
|
||||
}
|
||||
`)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user