settings: Refactor code for waiting period setting.

This commit refactors code for realm waiting period setting
to be similar to other time-based inputs. We also add the
code to disable the save button when custom inputs have
invalid values.
This commit is contained in:
Sahil Batra
2022-12-12 22:51:08 +05:30
committed by Tim Abbott
parent bc5f0e881e
commit 565d133985
5 changed files with 67 additions and 45 deletions

View File

@@ -155,7 +155,7 @@ async function submit_joining_organization_change(page: Page): Promise<void> {
async function test_set_new_user_threshold_to_three_days(page: Page): Promise<void> {
console.log("Test setting new user threshold to three days.");
await page.waitForSelector("#id_realm_waiting_period_threshold", {visible: true});
await page.select("#id_realm_waiting_period_threshold", "three_days");
await page.select("#id_realm_waiting_period_threshold", "3");
await submit_joining_organization_change(page);
}