Skip to content

Commit 03255f6

Browse files
committed
console: Update firefox version
1 parent bdafc80 commit 03255f6

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.github/workflows/console-e2e.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,14 @@ jobs:
238238
name: "build-files"
239239
- name: Unzip build artifacts
240240
run: unzip -o build.zip
241-
- name: Install Firefox 141.0 ESR
241+
- name: Install Firefox 141.0 (tar.xz)
242242
run: |
243243
FIREFOX_VERSION=141.0
244-
wget --no-verbose -O /tmp/firefox.tar.bz2 "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2"
245-
tar -C /opt -xjf /tmp/firefox.tar.bz2
246-
rm /tmp/firefox.tar.bz2
247-
sudo ln -fs /opt/firefox/firefox /usr/bin/firefox
244+
wget --no-verbose -O /tmp/firefox.tar.xz "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.xz"
245+
sudo rm -rf /opt/firefox
246+
sudo tar -C /opt -xJf /tmp/firefox.tar.xz
247+
sudo ln -sf /opt/firefox/firefox /usr/bin/firefox
248+
firefox --version
248249
- name: Generate certs
249250
run: tools/bin/mage dev:certificates
250251
- name: Restore initialized sql db

cypress/support/e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import './commands'
2121
const failedSpecsFilename = `./.cache/.failed-specs-${Cypress.env('MACHINE_NUMBER') || '0'}.txt`
2222

2323
configure({ testIdAttribute: 'data-test-id' })
24-
Cypress.SelectorPlayground.defaults({
24+
Cypress.ElementSelector.defaults({
2525
selectorPriority: ['data-test-id', 'id', 'class', 'tag', 'attributes', 'nth-child'],
2626
})
2727

cypress/support/utils.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import crypto from 'crypto'
16-
1715
/** Stack configuration utitlities. */
1816

1917
/**
@@ -124,7 +122,18 @@ const generateJoinServerOnlyConfig = config => {
124122
* @param {number} length - The length of the resulting hex value.
125123
* @returns {string} - Pseudorandom hex value of length `length`.
126124
*/
127-
const generateHexValue = length => crypto.randomBytes(Math.floor(length / 2)).toString('hex')
125+
const generateHexValue = (length) => {
126+
const byteLen = Math.ceil(length / 2)
127+
const bytes = new Uint8Array(byteLen)
128+
if (globalThis.crypto?.getRandomValues) {
129+
globalThis.crypto.getRandomValues(bytes)
130+
} else {
131+
for (let i = 0; i < byteLen; i++) bytes[i] = Math.floor(Math.random() * 256)
132+
}
133+
let hex = ''
134+
for (let i = 0; i < byteLen; i++) hex += bytes[i].toString(16).padStart(2, '0')
135+
return hex.slice(0, length)
136+
}
128137

129138
const generateCollaborator = (entity, type) => {
130139
const collabUserId = 'test-collab-user'

0 commit comments

Comments
 (0)