Feature/goal reduce flaky tests (#4247)
* Wait for current_password input to be visible * Login flow remove duplication + small fix change-password * Made hash-my-url more robust * Wait until locale is ready to resolve test flackiness * Added waitForSelector before trying to fill inputs
This commit is contained in:
1 parent
de54d75cd3
commit
d36d925788
4 files changed
+97
-82
No files matched your search
@@ -1,17 +1,20 @@
|
||||
import React, { SyntheticEvent, useState } from "react";
|
||||
|
||||
import { ErrorCode } from "@calcom/lib/auth";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import showToast from "@calcom/lib/notification";
|
||||
import Button from "@calcom/ui/Button";
|
||||
|
||||
import { ErrorCode } from "@lib/auth";
|
||||
import { useLocale } from "@lib/hooks/useLocale";
|
||||
|
||||
const ChangePasswordSection = () => {
|
||||
const [oldPassword, setOldPassword] = useState("");
|
||||
const [newPassword, setNewPassword] = useState("");
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const { t } = useLocale();
|
||||
const { t, isLocaleReady } = useLocale();
|
||||
// hold display until the locale is loaded
|
||||
if (!isLocaleReady) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const errorMessages: { [key: string]: string } = {
|
||||
[ErrorCode.IncorrectPassword]: t("current_incorrect_password"),
|
||||
|
||||
Reference in new issue
Block a user