diff --git a/tests/queries/test_qs_combinators.py b/tests/queries/test_qs_combinators.py
index 97b3f97b68..df98175b49 100644
--- a/tests/queries/test_qs_combinators.py
+++ b/tests/queries/test_qs_combinators.py
@@ -278,6 +278,36 @@ class QuerySetSetOperationTests(TestCase):
             operator.itemgetter("num"),
         )
 
+    def test_union_with_select_related_and_order(self):
+        base_qs = Author.objects.select_related('extra').order_by()
+        qs1 = base_qs.filter(name="a1")
+        qs2 = base_qs.filter(name="a2")
+        self.assertFalse(
+            bool(
+                qs1.union(qs2).order_by("pk")
+            )
+        )
+
+    def test_union_with_select_related_and_first(self):
+        base_qs = Author.objects.select_related('extra')
+        qs1 = base_qs.filter(name="a1")
+        qs2 = base_qs.filter(name="a2")
+        self.assertFalse(
+            bool(
+                qs1.union(qs2).first()
+            )
+        )
+
+    def test_union_with_first(self):
+        base_qs = Author.objects.order_by()
+        qs1 = base_qs.filter(name="a1")
+        qs2 = base_qs.filter(name="a2")
+        self.assertFalse(
+            bool(
+                qs1.union(qs2).first()
+            )
+        )
+
     def test_union_multiple_models_with_values_list_and_order(self):
         reserved_name = ReservedName.objects.create(name="rn1", order=0)
         qs1 = Celebrity.objects.all()
