From 21a85d35d0fd2c5b9b8533252a3e71cd6de85139 Mon Sep 17 00:00:00 2001
From: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Date: Sun, 15 Dec 2024 19:00:55 +0100
Subject: [PATCH 1/4] ci: Allow extension check tests to fail

* To debug the issue causing failures

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
---
 .github/workflows/step_tests-pip.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/step_tests-pip.yml b/.github/workflows/step_tests-pip.yml
index 8462bf2e..4d5ab233 100644
--- a/.github/workflows/step_tests-pip.yml
+++ b/.github/workflows/step_tests-pip.yml
@@ -86,6 +86,7 @@ jobs:
         run: pytest -n logical --cov --cov-report=xml
 
       - name: Test lab extension
+        continue-on-error: true
         run: |
           # Uninstall jupyter-fs as it overrides the original browser-test.js to
           # check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)
@@ -97,8 +98,7 @@ jobs:
           jupyter labextension list
           jupyter labextension list 2>&1 | grep -ie "jupyterlab-jupytext.*OK"
 
-          # Commented out on Dec 15, 2024, until we can fix that test
-          # python -m jupyterlab.browser_check
+          python -m jupyterlab.browser_check
 
       - name: Upload coverage
         uses: codecov/codecov-action@v3

From ac9ef49699bd49e90625a6f7994e1098d930cd73 Mon Sep 17 00:00:00 2001
From: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Date: Sun, 15 Dec 2024 19:29:49 +0100
Subject: [PATCH 2/4] ci: Set locale manually before browser check tests

* Ref: https://github.com/jupyterlab/jupyterlab/issues/17079

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
---
 .github/workflows/step_tests-pip.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/step_tests-pip.yml b/.github/workflows/step_tests-pip.yml
index 4d5ab233..def9bf62 100644
--- a/.github/workflows/step_tests-pip.yml
+++ b/.github/workflows/step_tests-pip.yml
@@ -98,6 +98,9 @@ jobs:
           jupyter labextension list
           jupyter labextension list 2>&1 | grep -ie "jupyterlab-jupytext.*OK"
 
+          # Ensure locale LANG is set. See https://github.com/jupyterlab/jupyterlab/issues/17079
+          export LANG="en_US.utf8"
+
           python -m jupyterlab.browser_check
 
       - name: Upload coverage

From 629c64d9c5bdef15351a5c65927bde88ab60b1d4 Mon Sep 17 00:00:00 2001
From: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Date: Sun, 15 Dec 2024 19:41:05 +0100
Subject: [PATCH 3/4] ci: Temporary fix to browser check test failure

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
---
 .github/workflows/step_tests-pip.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/step_tests-pip.yml b/.github/workflows/step_tests-pip.yml
index def9bf62..5188a816 100644
--- a/.github/workflows/step_tests-pip.yml
+++ b/.github/workflows/step_tests-pip.yml
@@ -86,7 +86,6 @@ jobs:
         run: pytest -n logical --cov --cov-report=xml
 
       - name: Test lab extension
-        continue-on-error: true
         run: |
           # Uninstall jupyter-fs as it overrides the original browser-test.js to
           # check its own functionality (https://github.com/jpmorganchase/jupyter-fs/blob/main/jupyterfs/browser-test.js)

From a567f6844a3cec0d24756fa537c69c61dee25b0c Mon Sep 17 00:00:00 2001
From: Mahendra Paipuri <mahendra.paipuri@gmail.com>
Date: Sun, 15 Dec 2024 19:41:50 +0100
Subject: [PATCH 4/4] ci: Fix browser checks on conda tests too

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
---
 .github/workflows/step_tests-conda.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/step_tests-conda.yml b/.github/workflows/step_tests-conda.yml
index ebddbd23..494edd4a 100644
--- a/.github/workflows/step_tests-conda.yml
+++ b/.github/workflows/step_tests-conda.yml
@@ -66,8 +66,10 @@ jobs:
           jupyter labextension list
           jupyter labextension list 2>&1 | grep -ie "jupyterlab-jupytext.*OK"
 
-          # Commented out on Dec 15, 2024, until we can fix that test
-          # python -m jupyterlab.browser_check
+          # Ensure locale LANG is set. See https://github.com/jupyterlab/jupyterlab/issues/17079
+          export LANG="en_US.utf8"
+
+          python -m jupyterlab.browser_check
 
       - name: Upload coverage
         uses: codecov/codecov-action@v3