2021-09-03 08:43:03 +00:00
|
|
|
pub use flowy_test::{
|
2023-02-13 01:29:49 +00:00
|
|
|
event_builder::*,
|
|
|
|
prelude::{login_password, random_email},
|
2021-09-03 08:43:03 +00:00
|
|
|
};
|
2021-07-17 02:26:05 +00:00
|
|
|
|
2021-07-11 07:33:19 +00:00
|
|
|
pub(crate) fn invalid_email_test_case() -> Vec<String> {
|
2023-02-13 01:29:49 +00:00
|
|
|
// https://gist.github.com/cjaoude/fd9910626629b53c4d25
|
|
|
|
vec![
|
|
|
|
"annie@",
|
|
|
|
"annie@gmail@",
|
|
|
|
"#@%^%#$@#$@#.com",
|
|
|
|
"@example.com",
|
|
|
|
"Joe Smith <email@example.com>",
|
|
|
|
"email.example.com",
|
|
|
|
"email@example@example.com",
|
|
|
|
"email@-example.com",
|
|
|
|
"email@example..com",
|
|
|
|
"あいうえお@example.com",
|
|
|
|
/* The following email is valid according to the validate_email function return
|
|
|
|
* ".email@example.com",
|
|
|
|
* "email.@example.com",
|
|
|
|
* "email..email@example.com",
|
|
|
|
* "email@example",
|
|
|
|
* "email@example.web",
|
|
|
|
* "email@111.222.333.44444",
|
|
|
|
* "Abc..123@example.com", */
|
|
|
|
]
|
|
|
|
.iter()
|
|
|
|
.map(|s| s.to_string())
|
|
|
|
.collect::<Vec<_>>()
|
2021-07-11 07:33:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub(crate) fn invalid_password_test_case() -> Vec<String> {
|
2023-02-13 01:29:49 +00:00
|
|
|
vec!["123456", "1234".repeat(100).as_str()]
|
|
|
|
.iter()
|
|
|
|
.map(|s| s.to_string())
|
|
|
|
.collect::<Vec<_>>()
|
2021-07-11 07:33:19 +00:00
|
|
|
}
|
|
|
|
|
2022-01-23 04:14:00 +00:00
|
|
|
pub(crate) fn valid_name() -> String {
|
2023-02-13 01:29:49 +00:00
|
|
|
"AppFlowy".to_string()
|
2022-01-23 04:14:00 +00:00
|
|
|
}
|