[Ubuntu] Add Microsoft Edge (#5874)

trailing whitespace
This commit is contained in:
Mikhail Koliada
2022-07-08 07:49:17 +02:00
committed by GitHub
parent b87bdfb146
commit e91961e2f2
7 changed files with 41 additions and 1 deletions

View File

@@ -23,6 +23,12 @@ function Get-ChromiumVersion {
return $chromiumVersion return $chromiumVersion
} }
function Get-EdgeVersion {
$edgeVersion = (microsoft-edge --version).trim()
$aptSourceRepo = Get-AptSourceRepository -PackageName "microsoft-edge"
return "$edgeVersion (apt source repository: $aptSourceRepo)"
}
function Get-SeleniumVersion { function Get-SeleniumVersion {
$seleniumBinaryName = Get-ToolsetValue "selenium.binary_name" $seleniumBinaryName = Get-ToolsetValue "selenium.binary_name"
$fullSeleniumVersion = (Get-ChildItem "/usr/share/java/${seleniumBinaryName}-*").Name -replace "${seleniumBinaryName}-" $fullSeleniumVersion = (Get-ChildItem "/usr/share/java/${seleniumBinaryName}-*").Name -replace "${seleniumBinaryName}-"

View File

@@ -231,6 +231,7 @@ $browsersAndDriversList = @(
(Get-ChromeVersion), (Get-ChromeVersion),
(Get-ChromeDriverVersion), (Get-ChromeDriverVersion),
(Get-ChromiumVersion), (Get-ChromiumVersion),
(Get-EdgeVersion),
(Get-SeleniumVersion) (Get-SeleniumVersion)
) )

View File

@@ -0,0 +1,24 @@
#!/bin/bash -e
################################################################################
## File: microsoft-edge.sh
## Desc: Installs Microsoft Edge
################################################################################
REPO_URL="https://packages.microsoft.com/repos/edge"
gpg_key="/usr/share/keyrings/microsoft-edge.gpg"
repo_path="/etc/apt/sources.list.d/microsoft-edge.list"
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > $gpg_key
# Specify an arch as Microsoft repository supports armhf and arm64 as well
echo "deb [arch=amd64 signed-by=$gpg_key] $REPO_URL stable main" > $repo_path
apt-get update
apt-get install --no-install-recommends microsoft-edge-stable
rm $gpg_key
rm $repo_path
echo "microsoft-edge $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
invoke_tests "Browsers" "Edge"

View File

@@ -18,8 +18,14 @@ Describe "Chrome" {
} }
} }
Describe "Edge" {
It "Edge" {
"microsoft-edge --version" | Should -ReturnZeroExitCode
}
}
Describe "Chromium" { Describe "Chromium" {
It "Chromium" { It "Chromium" {
"chromium-browser --version" | Should -ReturnZeroExitCode "chromium-browser --version" | Should -ReturnZeroExitCode
} }
} }

View File

@@ -203,6 +203,7 @@
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh", "{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
"{{template_dir}}/scripts/installers/erlang.sh", "{{template_dir}}/scripts/installers/erlang.sh",
"{{template_dir}}/scripts/installers/firefox.sh", "{{template_dir}}/scripts/installers/firefox.sh",
"{{template_dir}}/scripts/installers/microsoft-edge.sh",
"{{template_dir}}/scripts/installers/gcc.sh", "{{template_dir}}/scripts/installers/gcc.sh",
"{{template_dir}}/scripts/installers/gfortran.sh", "{{template_dir}}/scripts/installers/gfortran.sh",
"{{template_dir}}/scripts/installers/git.sh", "{{template_dir}}/scripts/installers/git.sh",

View File

@@ -204,6 +204,7 @@
"{{template_dir}}/scripts/installers/dotnetcore-sdk.sh", "{{template_dir}}/scripts/installers/dotnetcore-sdk.sh",
"{{template_dir}}/scripts/installers/erlang.sh", "{{template_dir}}/scripts/installers/erlang.sh",
"{{template_dir}}/scripts/installers/firefox.sh", "{{template_dir}}/scripts/installers/firefox.sh",
"{{template_dir}}/scripts/installers/microsoft-edge.sh",
"{{template_dir}}/scripts/installers/gcc.sh", "{{template_dir}}/scripts/installers/gcc.sh",
"{{template_dir}}/scripts/installers/gfortran.sh", "{{template_dir}}/scripts/installers/gfortran.sh",
"{{template_dir}}/scripts/installers/git.sh", "{{template_dir}}/scripts/installers/git.sh",

View File

@@ -273,6 +273,7 @@ build {
"${path.root}/scripts/installers/codeql-bundle.sh", "${path.root}/scripts/installers/codeql-bundle.sh",
"${path.root}/scripts/installers/containers.sh", "${path.root}/scripts/installers/containers.sh",
"${path.root}/scripts/installers/dotnetcore-sdk.sh", "${path.root}/scripts/installers/dotnetcore-sdk.sh",
"${path.root}/scripts/installers/microsoft-edge.sh",
"${path.root}/scripts/installers/gcc.sh", "${path.root}/scripts/installers/gcc.sh",
"${path.root}/scripts/installers/gfortran.sh", "${path.root}/scripts/installers/gfortran.sh",
"${path.root}/scripts/installers/git.sh", "${path.root}/scripts/installers/git.sh",