summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-07-25 11:49:57 +0200
committerMichael Weiss <dev.primeos@gmail.com>2021-07-25 12:35:21 +0200
commit7b3c0545149cb5c67611945d6022b61047439d61 (patch)
tree2afa0b8c45f627c2c2007c51d60cd6f698d598a8
parenta0b7bd69ac1ff18f6cfc501700b4607b8a47bed9 (diff)
downloadnixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.tar
nixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.tar.gz
nixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.tar.bz2
nixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.tar.lz
nixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.tar.xz
nixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.tar.zst
nixpkgs-7b3c0545149cb5c67611945d6022b61047439d61.zip
nixos/tests/chromium: Check the version and that it's an official build
This also prints and screenshots the output of chrome://version which
contains useful information.

Outputs (stable, beta, ungoogled, chrome-stable, chrome-beta, chrome-dev):
Chromium	92.0.4515.107 (Official Build) (64-bit)
Chromium        92.0.4515.107 (Official Build) (64-bit)
Chromium        91.0.4472.164 (Official Build, ungoogled-chromium) (64-bit)
Google Chrome   92.0.4515.107 (Official Build) (64-bit)
Google Chrome   92.0.4515.107 (Official Build) beta (64-bit)
Google Chrome   93.0.4577.8 (Official Build) dev (64-bit)
-rw-r--r--nixos/tests/chromium.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix
index 0c85b2d2199..4d34c852389 100644
--- a/nixos/tests/chromium.nix
+++ b/nixos/tests/chromium.nix
@@ -243,6 +243,16 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
         machine.wait_for_text("Graphics Feature Status")
 
 
+    with test_new_win("version_info", "chrome://version", "About Version") as clipboard:
+        filters = [
+            r"${chromiumPkg.version} \(Official Build",
+        ]
+        if not all(
+            re.search(filter, clipboard) for filter in filters
+        ):
+            assert False, "Version info not correct."
+
+
     machine.shutdown()
   '';
 }) channelMap