mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
33 lines
757 B
Rust
33 lines
757 B
Rust
use thirtyfour::{prelude::*, WebDriver};
|
|
|
|
use crate::{selenium::*, tester};
|
|
|
|
struct BluesnapSeleniumTest;
|
|
|
|
impl SeleniumTest for BluesnapSeleniumTest {
|
|
fn get_connector_name(&self) -> String {
|
|
"bluesnap".to_string()
|
|
}
|
|
}
|
|
|
|
async fn should_make_webhook(web_driver: WebDriver) -> Result<(), WebDriverError> {
|
|
let conn = BluesnapSeleniumTest {};
|
|
conn.make_webhook_test(
|
|
web_driver,
|
|
&format!("{CHECKOUT_BASE_URL}/saved/199"),
|
|
vec![
|
|
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
|
|
Event::Assert(Assert::IsPresent("succeeded")),
|
|
],
|
|
10,
|
|
"succeeded",
|
|
)
|
|
.await?;
|
|
Ok(())
|
|
}
|
|
|
|
#[test]
|
|
fn should_make_webhook_test() {
|
|
tester!(should_make_webhook);
|
|
}
|