diff --git a/empty_fields.info.yml b/empty_fields.info.yml
index 654bed6..a529edf 100644
--- a/empty_fields.info.yml
+++ b/empty_fields.info.yml
@@ -1,4 +1,4 @@
 name: Empty Fields
 description: Provides options for displaying empty fields.
 type: module
-core_version_requirement: ^8.8 || ^9
+core_version_requirement: ^9.1 || ^10
diff --git a/tests/src/Functional/EmptyFieldsTest.php b/tests/src/Functional/EmptyFieldsTest.php
index d6df742..56930d5 100644
--- a/tests/src/Functional/EmptyFieldsTest.php
+++ b/tests/src/Functional/EmptyFieldsTest.php
@@ -58,14 +58,16 @@ class EmptyFieldsTest extends BrowserTestBase {
 
     $field_value = $this->randomMachineName();
     $edit = [$field_name . '[0][value]' => $field_value];
-    $this->drupalPostForm($this->webUser->toUrl('edit-form'), $edit, 'Save');
+    $this->drupalGet($this->webUser->toUrl('edit-form'));
+    $this->submitForm($edit, 'Save');
     // Verify that field is displayed when has value.
     $this->drupalGet($url);
     $this->assertSession()->responseContains($field_label);
     $this->assertSession()->responseContains($field_value);
 
     $edit = [$field_name . '[0][value]' => ''];
-    $this->drupalPostForm($this->webUser->toUrl('edit-form'), $edit, 'Save');
+    $this->drupalGet($this->webUser->toUrl('edit-form'));
+    $this->submitForm($edit, 'Save');
     // Make sure empty field is hidden.
     $this->drupalGet($url);
     $this->assertSession()->responseNotContains($field_label);
