Files
Prasunna Soppa cd4dbcb3f6 test(connector): Add tests for Paypal, Adyen and Airwallex (#1290)
Co-authored-by: Jagan Elavarasan <jaganelavarasan@gmail.com>
2023-06-30 04:58:51 +00:00

38 lines
893 B
Rust

use serial_test::serial;
use thirtyfour::{prelude::*, WebDriver};
use crate::{selenium::*, tester};
struct PaypalSeleniumTest;
impl SeleniumTest for PaypalSeleniumTest {
fn get_connector_name(&self) -> String {
"paypal".to_string()
}
}
async fn should_make_paypal_paypal_wallet_payment(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
let conn = PaypalSeleniumTest {};
conn.make_paypal_payment(
web_driver,
&format!("{CHEKOUT_BASE_URL}/saved/21"),
vec![
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(
Selector::QueryParamStr,
vec!["status=succeeded"],
)),
],
)
.await?;
Ok(())
}
#[test]
#[serial]
fn should_make_paypal_paypal_wallet_payment_test() {
tester!(should_make_paypal_paypal_wallet_payment);
}