text
stringlengths 70
351k
| source
stringclasses 4
values |
|---|---|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs<|crate|> test_utils<|connector|> shift4_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"shift4".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="33" end="50">
async fn should_make_giropay_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/39"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="14" end="31">
async fn should_make_3ds_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/37"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs<|crate|> test_utils<|connector|> shift4_ui anchor=should_make_giropay_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="117" end="119">
fn should_make_giropay_payment_test() {
tester!(should_make_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="129" end="131">
fn should_make_sofort_payment_test() {
tester!(should_make_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="123" end="125">
fn should_make_ideal_payment_test() {
tester!(should_make_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="111" end="113">
fn should_make_3ds_payment_test() {
tester!(should_make_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="90" end="107">
async fn should_make_eps_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/157"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs<|crate|> test_utils<|connector|> shift4_ui anchor=should_make_eps_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="90" end="107">
async fn should_make_eps_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/157"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="117" end="119">
fn should_make_giropay_payment_test() {
tester!(should_make_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="111" end="113">
fn should_make_3ds_payment_test() {
tester!(should_make_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="71" end="88">
async fn should_make_sofort_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/43"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="52" end="69">
async fn should_make_ideal_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/42"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="6" end="6">
struct Shift4SeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs<|crate|> test_utils<|connector|> shift4_ui anchor=should_make_ideal_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="52" end="69">
async fn should_make_ideal_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/42"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="90" end="107">
async fn should_make_eps_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/157"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="71" end="88">
async fn should_make_sofort_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/43"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="33" end="50">
async fn should_make_giropay_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/39"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="14" end="31">
async fn should_make_3ds_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/37"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="6" end="6">
struct Shift4SeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs<|crate|> test_utils<|connector|> shift4_ui anchor=should_make_3ds_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="14" end="31">
async fn should_make_3ds_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/37"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="52" end="69">
async fn should_make_ideal_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/42"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="33" end="50">
async fn should_make_giropay_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = Shift4SeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/39"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::ClassName("btn-success"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"shift4".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/shift4_ui.rs" role="context" start="6" end="6">
struct Shift4SeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs<|crate|> test_utils<|connector|> bluesnap_ui anchor=should_make_3ds_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="60" end="62">
fn should_make_3ds_payment_test() {
tester!(should_make_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="66" end="68">
fn should_make_gpay_payment_test() {
tester!(should_make_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="42" end="56">
async fn should_make_gpay_payment(driver: WebDriver) -> Result<(), WebDriverError> {
let conn = BluesnapSeleniumTest {};
let pub_key = conn
.get_configs()
.automation_configs
.unwrap()
.bluesnap_gateway_merchant_id
.unwrap();
conn.make_gpay_payment(driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=bluesnap&gatewaymerchantid={pub_key}&amount=11.00&country=US¤cy=USD"),
vec![
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="14" end="40">
async fn should_make_3ds_payment(driver: WebDriver) -> Result<(), WebDriverError> {
let conn = BluesnapSeleniumTest {};
conn.make_redirection_payment(
driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/200"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::RunIf(
Assert::IsElePresent(By::Id("Cardinal-CCA-IFrame")),
vec![
Event::Trigger(Trigger::SwitchFrame(By::Id("Cardinal-CCA-IFrame"))),
Event::Assert(Assert::IsPresent("Enter your code below")),
Event::Trigger(Trigger::SendKeys(By::Name("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::ClassName("button.primary"))),
],
),
Event::Trigger(Trigger::Sleep(10)),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs<|crate|> test_utils<|connector|> bluesnap_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"bluesnap".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="42" end="56">
async fn should_make_gpay_payment(driver: WebDriver) -> Result<(), WebDriverError> {
let conn = BluesnapSeleniumTest {};
let pub_key = conn
.get_configs()
.automation_configs
.unwrap()
.bluesnap_gateway_merchant_id
.unwrap();
conn.make_gpay_payment(driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=bluesnap&gatewaymerchantid={pub_key}&amount=11.00&country=US¤cy=USD"),
vec![
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="14" end="40">
async fn should_make_3ds_payment(driver: WebDriver) -> Result<(), WebDriverError> {
let conn = BluesnapSeleniumTest {};
conn.make_redirection_payment(
driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/200"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::RunIf(
Assert::IsElePresent(By::Id("Cardinal-CCA-IFrame")),
vec![
Event::Trigger(Trigger::SwitchFrame(By::Id("Cardinal-CCA-IFrame"))),
Event::Assert(Assert::IsPresent("Enter your code below")),
Event::Trigger(Trigger::SendKeys(By::Name("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::ClassName("button.primary"))),
],
),
Event::Trigger(Trigger::Sleep(10)),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs<|crate|> test_utils<|connector|> bluesnap_ui anchor=should_make_gpay_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="42" end="56">
async fn should_make_gpay_payment(driver: WebDriver) -> Result<(), WebDriverError> {
let conn = BluesnapSeleniumTest {};
let pub_key = conn
.get_configs()
.automation_configs
.unwrap()
.bluesnap_gateway_merchant_id
.unwrap();
conn.make_gpay_payment(driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=bluesnap&gatewaymerchantid={pub_key}&amount=11.00&country=US¤cy=USD"),
vec![
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="66" end="68">
fn should_make_gpay_payment_test() {
tester!(should_make_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="60" end="62">
fn should_make_3ds_payment_test() {
tester!(should_make_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="14" end="40">
async fn should_make_3ds_payment(driver: WebDriver) -> Result<(), WebDriverError> {
let conn = BluesnapSeleniumTest {};
conn.make_redirection_payment(
driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/200"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::RunIf(
Assert::IsElePresent(By::Id("Cardinal-CCA-IFrame")),
vec![
Event::Trigger(Trigger::SwitchFrame(By::Id("Cardinal-CCA-IFrame"))),
Event::Assert(Assert::IsPresent("Enter your code below")),
Event::Trigger(Trigger::SendKeys(By::Name("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::ClassName("button.primary"))),
],
),
Event::Trigger(Trigger::Sleep(10)),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"bluesnap".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_ui.rs" role="context" start="6" end="6">
struct BluesnapSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs<|crate|> test_utils<|connector|> authorizedotnet_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="10" end="12">
fn get_connector_name(&self) -> String {
"authorizedotnet".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="33" end="50">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AuthorizedotnetSeleniumTest {};
conn.make_paypal_payment(
web_driver,
&format!("{CHECKOUT_BASE_URL}/saved/156"),
vec![
Event::EitherOr(
Assert::IsElePresent(By::Css(".reviewButton")),
vec![Event::Trigger(Trigger::Click(By::Css(".reviewButton")))],
vec![Event::Trigger(Trigger::Click(By::Id("payment-submit-btn")))],
),
Event::Assert(Assert::IsPresent("status")),
Event::Assert(Assert::IsPresent("processing")), // This connector status will be processing for one day
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="15" end="31">
async fn should_make_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AuthorizedotnetSeleniumTest {};
let amount = rand::thread_rng().gen_range(1..1000); //This connector detects it as fraudulent payment if the same amount is used for multiple payments so random amount is passed for testing
let pub_key = conn
.get_configs()
.automation_configs
.unwrap()
.authorizedotnet_gateway_merchant_id
.unwrap();
conn.make_gpay_payment(web_driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=authorizenet&gatewaymerchantid={pub_key}&amount={amount}&country=US¤cy=USD"),
vec![
Event::Assert(Assert::IsPresent("status")),
Event::Assert(Assert::IsPresent("processing")), // This connector status will be processing for one day
]).await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs<|crate|> test_utils<|connector|> authorizedotnet_ui anchor=should_make_paypal_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="33" end="50">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AuthorizedotnetSeleniumTest {};
conn.make_paypal_payment(
web_driver,
&format!("{CHECKOUT_BASE_URL}/saved/156"),
vec![
Event::EitherOr(
Assert::IsElePresent(By::Css(".reviewButton")),
vec![Event::Trigger(Trigger::Click(By::Css(".reviewButton")))],
vec![Event::Trigger(Trigger::Click(By::Id("payment-submit-btn")))],
),
Event::Assert(Assert::IsPresent("status")),
Event::Assert(Assert::IsPresent("processing")), // This connector status will be processing for one day
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="61" end="63">
fn should_make_paypal_payment_test() {
tester!(should_make_paypal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="55" end="57">
fn should_make_gpay_payment_test() {
tester!(should_make_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="15" end="31">
async fn should_make_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AuthorizedotnetSeleniumTest {};
let amount = rand::thread_rng().gen_range(1..1000); //This connector detects it as fraudulent payment if the same amount is used for multiple payments so random amount is passed for testing
let pub_key = conn
.get_configs()
.automation_configs
.unwrap()
.authorizedotnet_gateway_merchant_id
.unwrap();
conn.make_gpay_payment(web_driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=authorizenet&gatewaymerchantid={pub_key}&amount={amount}&country=US¤cy=USD"),
vec![
Event::Assert(Assert::IsPresent("status")),
Event::Assert(Assert::IsPresent("processing")), // This connector status will be processing for one day
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="10" end="12">
fn get_connector_name(&self) -> String {
"authorizedotnet".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_ui.rs" role="context" start="7" end="7">
struct AuthorizedotnetSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"mollie".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="37" end="58">
async fn should_make_mollie_sofort_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MollieSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/29"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Test profile")),
Event::Trigger(Trigger::Click(By::Css("input[value='paid']"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='button form__button']",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="14" end="35">
async fn should_make_mollie_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MollieSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/32"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Test profile")),
Event::Trigger(Trigger::Click(By::Css("input[value='paid']"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='button form__button']",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_eps_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="214" end="216">
fn should_make_mollie_eps_payment_test() {
tester!(should_make_mollie_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="226" end="228">
fn should_make_mollie_bancontact_card_payment_test() {
tester!(should_make_mollie_bancontact_card_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="220" end="222">
fn should_make_mollie_giropay_payment_test() {
tester!(should_make_mollie_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="208" end="210">
fn should_make_mollie_ideal_payment_test() {
tester!(should_make_mollie_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="202" end="204">
fn should_make_mollie_sofort_payment_test() {
tester!(should_make_mollie_sofort_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_ideal_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="208" end="210">
fn should_make_mollie_ideal_payment_test() {
tester!(should_make_mollie_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="220" end="222">
fn should_make_mollie_giropay_payment_test() {
tester!(should_make_mollie_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="214" end="216">
fn should_make_mollie_eps_payment_test() {
tester!(should_make_mollie_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="202" end="204">
fn should_make_mollie_sofort_payment_test() {
tester!(should_make_mollie_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="196" end="198">
fn should_make_mollie_paypal_payment_test() {
tester!(should_make_mollie_paypal_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_sofort_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="202" end="204">
fn should_make_mollie_sofort_payment_test() {
tester!(should_make_mollie_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="214" end="216">
fn should_make_mollie_eps_payment_test() {
tester!(should_make_mollie_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="208" end="210">
fn should_make_mollie_ideal_payment_test() {
tester!(should_make_mollie_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="196" end="198">
fn should_make_mollie_paypal_payment_test() {
tester!(should_make_mollie_paypal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="175" end="192">
async fn should_make_mollie_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MollieSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/148"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Test profile")),
Event::Trigger(Trigger::Click(By::Css("input[value='paid']"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='button form__button']",
))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_bancontact_card_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="226" end="228">
fn should_make_mollie_bancontact_card_payment_test() {
tester!(should_make_mollie_bancontact_card_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="238" end="240">
fn should_make_mollie_3ds_payment_test() {
tester!(should_make_mollie_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="232" end="234">
fn should_make_mollie_przelewy24_payment_test() {
tester!(should_make_mollie_przelewy24_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="220" end="222">
fn should_make_mollie_giropay_payment_test() {
tester!(should_make_mollie_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="214" end="216">
fn should_make_mollie_eps_payment_test() {
tester!(should_make_mollie_eps_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_giropay_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="220" end="222">
fn should_make_mollie_giropay_payment_test() {
tester!(should_make_mollie_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="232" end="234">
fn should_make_mollie_przelewy24_payment_test() {
tester!(should_make_mollie_przelewy24_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="226" end="228">
fn should_make_mollie_bancontact_card_payment_test() {
tester!(should_make_mollie_bancontact_card_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="214" end="216">
fn should_make_mollie_eps_payment_test() {
tester!(should_make_mollie_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="208" end="210">
fn should_make_mollie_ideal_payment_test() {
tester!(should_make_mollie_ideal_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_przelewy24_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="232" end="234">
fn should_make_mollie_przelewy24_payment_test() {
tester!(should_make_mollie_przelewy24_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="238" end="240">
fn should_make_mollie_3ds_payment_test() {
tester!(should_make_mollie_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="226" end="228">
fn should_make_mollie_bancontact_card_payment_test() {
tester!(should_make_mollie_bancontact_card_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="220" end="222">
fn should_make_mollie_giropay_payment_test() {
tester!(should_make_mollie_giropay_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs<|crate|> test_utils<|connector|> mollie_ui anchor=should_make_mollie_3ds_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="175" end="192">
async fn should_make_mollie_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MollieSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/148"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Test profile")),
Event::Trigger(Trigger::Click(By::Css("input[value='paid']"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='button form__button']",
))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="202" end="204">
fn should_make_mollie_sofort_payment_test() {
tester!(should_make_mollie_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="196" end="198">
fn should_make_mollie_paypal_payment_test() {
tester!(should_make_mollie_paypal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="152" end="173">
async fn should_make_mollie_przelewy24_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = MollieSeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/87"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Test profile")),
Event::Trigger(Trigger::Click(By::Css("input[value='paid']"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='button form__button']",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="129" end="150">
async fn should_make_mollie_bancontact_card_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = MollieSeleniumTest {};
conn.make_redirection_payment(
c,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/86"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("Test profile")),
Event::Trigger(Trigger::Click(By::Css("input[value='paid']"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='button form__button']",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/mollie_ui.rs" role="context" start="6" end="6">
struct MollieSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs<|crate|> test_utils<|connector|> airwallex_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"airwallex".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="39" end="57">
async fn should_make_airwallex_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
let merchant_name = conn
.get_configs()
.automation_configs
.unwrap()
.airwallex_merchant_name
.unwrap();
conn.make_gpay_payment(web_driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=airwallex&gatewaymerchantid={merchant_name}&amount=70.00&country=US¤cy=USD"),
vec![
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "Airwallex - Create 3D Secure Payment")),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="14" end="37">
async fn should_make_airwallex_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/85"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(
Selector::Title,
"Airwallex - Create 3D Secure Payment",
)),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs<|crate|> test_utils<|connector|> airwallex_ui anchor=should_make_airwallex_gpay_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="68" end="70">
fn should_make_airwallex_gpay_payment_test() {
tester!(should_make_airwallex_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="61" end="63">
fn should_make_airwallex_3ds_payment_test() {
tester!(should_make_airwallex_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="39" end="57">
async fn should_make_airwallex_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
let merchant_name = conn
.get_configs()
.automation_configs
.unwrap()
.airwallex_merchant_name
.unwrap();
conn.make_gpay_payment(web_driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=airwallex&gatewaymerchantid={merchant_name}&amount=70.00&country=US¤cy=USD"),
vec![
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "Airwallex - Create 3D Secure Payment")),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs<|crate|> test_utils<|connector|> airwallex_ui anchor=should_make_airwallex_3ds_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="61" end="63">
fn should_make_airwallex_3ds_payment_test() {
tester!(should_make_airwallex_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="68" end="70">
fn should_make_airwallex_gpay_payment_test() {
tester!(should_make_airwallex_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="39" end="57">
async fn should_make_airwallex_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
let merchant_name = conn
.get_configs()
.automation_configs
.unwrap()
.airwallex_merchant_name
.unwrap();
conn.make_gpay_payment(web_driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=airwallex&gatewaymerchantid={merchant_name}&amount=70.00&country=US¤cy=USD"),
vec![
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "Airwallex - Create 3D Secure Payment")),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="14" end="37">
async fn should_make_airwallex_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/85"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(
Selector::Title,
"Airwallex - Create 3D Secure Payment",
)),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs<|crate|> test_utils<|connector|> airwallex_ui anchor=should_make_airwallex_3ds_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="14" end="37">
async fn should_make_airwallex_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/85"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(
Selector::Title,
"Airwallex - Create 3D Secure Payment",
)),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="61" end="63">
fn should_make_airwallex_3ds_payment_test() {
tester!(should_make_airwallex_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="39" end="57">
async fn should_make_airwallex_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AirwallexSeleniumTest {};
let merchant_name = conn
.get_configs()
.automation_configs
.unwrap()
.airwallex_merchant_name
.unwrap();
conn.make_gpay_payment(web_driver,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=airwallex&gatewaymerchantid={merchant_name}&amount=70.00&country=US¤cy=USD"),
vec![
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "Airwallex - Create 3D Secure Payment")),
Event::Trigger(Trigger::SendKeys(By::Id("challengeDataEntry"), "1234")),
Event::Trigger(Trigger::Click(By::Id("submit"))),
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"airwallex".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/airwallex_ui.rs" role="context" start="6" end="6">
struct AirwallexSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs<|crate|> test_utils<|connector|> authorizedotnet_wh_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"authorizedotnet".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="33" end="35">
fn should_make_webhook_test() {
tester!(should_make_webhook);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="14" end="30">
async fn should_make_webhook(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AuthorizedotnetSeleniumTest {};
let amount = rand::thread_rng().gen_range(50..1000); //This connector detects it as fraudulent payment if the same amount is used for multiple payments so random amount is passed for testing(
conn.make_webhook_test(
web_driver,
&format!("{CHECKOUT_BASE_URL}/saved/227?amount={amount}"),
vec![
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("status")),
Event::Assert(Assert::IsPresent("processing")),
],
10,
"processing",
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs<|crate|> test_utils<|connector|> authorizedotnet_wh_ui anchor=should_make_webhook kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="14" end="30">
async fn should_make_webhook(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AuthorizedotnetSeleniumTest {};
let amount = rand::thread_rng().gen_range(50..1000); //This connector detects it as fraudulent payment if the same amount is used for multiple payments so random amount is passed for testing(
conn.make_webhook_test(
web_driver,
&format!("{CHECKOUT_BASE_URL}/saved/227?amount={amount}"),
vec![
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("status")),
Event::Assert(Assert::IsPresent("processing")),
],
10,
"processing",
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="33" end="35">
fn should_make_webhook_test() {
tester!(should_make_webhook);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"authorizedotnet".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/authorizedotnet_wh_ui.rs" role="context" start="6" end="6">
struct AuthorizedotnetSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs<|crate|> test_utils<|connector|> bluesnap_wh_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="8" end="10">
fn get_connector_name(&self) -> String {
"bluesnap".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="30" end="32">
fn should_make_webhook_test() {
tester!(should_make_webhook);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="13" end="27">
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(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs<|crate|> test_utils<|connector|> bluesnap_wh_ui anchor=should_make_webhook kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="13" end="27">
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(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="30" end="32">
fn should_make_webhook_test() {
tester!(should_make_webhook);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="8" end="10">
fn get_connector_name(&self) -> String {
"bluesnap".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/bluesnap_wh_ui.rs" role="context" start="5" end="5">
struct BluesnapSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"nuvei".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="31" end="45">
async fn should_make_nuvei_3ds_mandate_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/card?cname=CL-BRW1&ccnum=4000027891380961&expmonth=10&expyear=25&cvv=123&amount=200&country=US¤cy=USD&setup_future_usage=off_session&mandate_data[customer_acceptance][acceptance_type]=offline&mandate_data[customer_acceptance][accepted_at]=1963-05-03T04:07:52.723Z&mandate_data[customer_acceptance][online][ip_address]=in%20sit&mandate_data[customer_acceptance][online][user_agent]=amet%20irure%20esse&mandate_data[mandate_type][multi_use][amount]=7000&mandate_data[mandate_type][multi_use][currency]=USD&mandate_data[mandate_type][multi_use][start_date]=2022-09-10T00:00:00Z&mandate_data[mandate_type][multi_use][end_date]=2023-09-10T00:00:00Z&mandate_data[mandate_type][multi_use][metadata][frequency]=13&return_url={CHECKOUT_BASE_URL}/payments"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "ThreeDS ACS Emulator - Challenge Page")),
Event::Trigger(Trigger::Click(By::Id("btn1"))),
Event::Trigger(Trigger::Click(By::Id("btn5"))),
Event::Assert(Assert::IsPresent("succeeded")),
Event::Assert(Assert::IsPresent("man_")),//mandate id prefix is present
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="14" end="29">
async fn should_make_nuvei_3ds_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/card?cname=CL-BRW1&ccnum=4000027891380961&expmonth=10&expyear=25&cvv=123&amount=200&country=US¤cy=USD"))),
Event::Assert(Assert::IsPresent("Expiry Year")),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "ThreeDS ACS Emulator - Challenge Page")),
Event::Trigger(Trigger::Click(By::Id("btn1"))),
Event::Trigger(Trigger::Click(By::Id("btn5"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(Selector::QueryParamStr, "status=succeeded")),
]).await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_eps_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="191" end="193">
fn should_make_nuvei_eps_payment_test() {
tester!(should_make_nuvei_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="185" end="187">
fn should_make_nuvei_sofort_payment_test() {
tester!(should_make_nuvei_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="179" end="181">
fn should_make_nuvei_ideal_payment_test() {
tester!(should_make_nuvei_ideal_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_pypl_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="167" end="169">
fn should_make_nuvei_pypl_payment_test() {
tester!(should_make_nuvei_pypl_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="179" end="181">
fn should_make_nuvei_ideal_payment_test() {
tester!(should_make_nuvei_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="173" end="175">
fn should_make_nuvei_giropay_payment_test() {
tester!(should_make_nuvei_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="161" end="163">
fn should_make_nuvei_gpay_payment_test() {
tester!(should_make_nuvei_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="155" end="157">
fn should_make_nuvei_3ds_mandate_payment_test() {
tester!(should_make_nuvei_3ds_mandate_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_gpay_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="161" end="163">
fn should_make_nuvei_gpay_payment_test() {
tester!(should_make_nuvei_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="173" end="175">
fn should_make_nuvei_giropay_payment_test() {
tester!(should_make_nuvei_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="167" end="169">
fn should_make_nuvei_pypl_payment_test() {
tester!(should_make_nuvei_pypl_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="155" end="157">
fn should_make_nuvei_3ds_mandate_payment_test() {
tester!(should_make_nuvei_3ds_mandate_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="149" end="151">
fn should_make_nuvei_3ds_payment_test() {
tester!(should_make_nuvei_3ds_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_sofort_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="185" end="187">
fn should_make_nuvei_sofort_payment_test() {
tester!(should_make_nuvei_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="191" end="193">
fn should_make_nuvei_eps_payment_test() {
tester!(should_make_nuvei_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="179" end="181">
fn should_make_nuvei_ideal_payment_test() {
tester!(should_make_nuvei_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="173" end="175">
fn should_make_nuvei_giropay_payment_test() {
tester!(should_make_nuvei_giropay_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_3ds_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="149" end="151">
fn should_make_nuvei_3ds_payment_test() {
tester!(should_make_nuvei_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="161" end="163">
fn should_make_nuvei_gpay_payment_test() {
tester!(should_make_nuvei_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="155" end="157">
fn should_make_nuvei_3ds_mandate_payment_test() {
tester!(should_make_nuvei_3ds_mandate_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="130" end="145">
async fn should_make_nuvei_eps_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/bank-redirect?amount=10.00&country=AT¤cy=EUR&paymentmethod=eps&processingbank=ing"))),
Event::Trigger(Trigger::Click(By::Id("bank-redirect-btn"))),
Event::Assert(Assert::IsPresent("You are about to make a payment using the EPS service.")),
Event::Trigger(Trigger::SendKeys(By::Id("ctl00_ctl00_mainContent_ServiceContent_txtCustomerName"), "John Doe")),
Event::Trigger(Trigger::Click(By::Id("ctl00_ctl00_mainContent_btnConfirm"))),
Event::Assert(Assert::IsPresent("Simulator")),
Event::Trigger(Trigger::SelectOption(By::Css("select[name='result']"), "Succeeded")),
Event::Trigger(Trigger::Click(By::Id("submitbutton"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(Selector::QueryParamStr, vec!["status=succeeded", "status=processing"]))
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="116" end="128">
async fn should_make_nuvei_sofort_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/bank-redirect?amount=10.00&country=DE¤cy=EUR&paymentmethod=sofort"))),
Event::Trigger(Trigger::Click(By::Id("bank-redirect-btn"))),
Event::Assert(Assert::IsPresent("SOFORT")),
Event::Trigger(Trigger::ChangeQueryParam("sender_holder", "John Doe")),
Event::Trigger(Trigger::Click(By::Id("ctl00_mainContent_btnGo"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(Selector::QueryParamStr, vec!["status=succeeded", "status=processing"]))
]).await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_giropay_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="173" end="175">
fn should_make_nuvei_giropay_payment_test() {
tester!(should_make_nuvei_giropay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="185" end="187">
fn should_make_nuvei_sofort_payment_test() {
tester!(should_make_nuvei_sofort_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="179" end="181">
fn should_make_nuvei_ideal_payment_test() {
tester!(should_make_nuvei_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="167" end="169">
fn should_make_nuvei_pypl_payment_test() {
tester!(should_make_nuvei_pypl_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="161" end="163">
fn should_make_nuvei_gpay_payment_test() {
tester!(should_make_nuvei_gpay_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_3ds_mandate_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="155" end="157">
fn should_make_nuvei_3ds_mandate_payment_test() {
tester!(should_make_nuvei_3ds_mandate_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="167" end="169">
fn should_make_nuvei_pypl_payment_test() {
tester!(should_make_nuvei_pypl_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="161" end="163">
fn should_make_nuvei_gpay_payment_test() {
tester!(should_make_nuvei_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="149" end="151">
fn should_make_nuvei_3ds_payment_test() {
tester!(should_make_nuvei_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="130" end="145">
async fn should_make_nuvei_eps_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/bank-redirect?amount=10.00&country=AT¤cy=EUR&paymentmethod=eps&processingbank=ing"))),
Event::Trigger(Trigger::Click(By::Id("bank-redirect-btn"))),
Event::Assert(Assert::IsPresent("You are about to make a payment using the EPS service.")),
Event::Trigger(Trigger::SendKeys(By::Id("ctl00_ctl00_mainContent_ServiceContent_txtCustomerName"), "John Doe")),
Event::Trigger(Trigger::Click(By::Id("ctl00_ctl00_mainContent_btnConfirm"))),
Event::Assert(Assert::IsPresent("Simulator")),
Event::Trigger(Trigger::SelectOption(By::Css("select[name='result']"), "Succeeded")),
Event::Trigger(Trigger::Click(By::Id("submitbutton"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(Selector::QueryParamStr, vec!["status=succeeded", "status=processing"]))
]).await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs<|crate|> test_utils<|connector|> nuvei_ui anchor=should_make_nuvei_gpay_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="47" end="55">
async fn should_make_nuvei_gpay_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_gpay_payment(c,
&format!("{CHECKOUT_BASE_URL}/gpay?gatewayname=nuveidigital&gatewaymerchantid=googletest&amount=10.00&country=IN¤cy=USD"),
vec![
Event::Assert(Assert::IsPresent("succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="75" end="97">
async fn should_make_nuvei_giropay_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/bank-redirect?amount=1.00&country=DE¤cy=EUR&paymentmethod=giropay"))),
Event::Trigger(Trigger::Click(By::Id("bank-redirect-btn"))),
Event::Assert(Assert::IsPresent("You are about to make a payment using the Giropay service.")),
Event::Trigger(Trigger::Click(By::Id("ctl00_ctl00_mainContent_btnConfirm"))),
Event::RunIf(Assert::IsPresent("Bank suchen"), vec![
Event::Trigger(Trigger::SendKeys(By::Id("bankSearch"), "GIROPAY Testbank 1")),
Event::Trigger(Trigger::Click(By::Id("GIROPAY Testbank 1"))),
]),
Event::Assert(Assert::IsPresent("GIROPAY Testbank 1")),
Event::Trigger(Trigger::Click(By::Css("button[name='claimCheckoutButton']"))),
Event::Assert(Assert::IsPresent("sandbox.paydirekt")),
Event::Trigger(Trigger::Click(By::Id("submitButton"))),
Event::Trigger(Trigger::Sleep(5)),
Event::Trigger(Trigger::SwitchTab(Position::Next)),
Event::Assert(Assert::IsPresent("Sicher bezahlt!")),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(Selector::QueryParamStr, vec!["status=succeeded", "status=processing"]))
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="57" end="73">
async fn should_make_nuvei_pypl_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_paypal_payment(
c,
&format!("{CHECKOUT_BASE_URL}/saved/5"),
vec![
Event::Trigger(Trigger::Click(By::Id("payment-submit-btn"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(
Selector::QueryParamStr,
vec!["status=succeeded"],
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="31" end="45">
async fn should_make_nuvei_3ds_mandate_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/card?cname=CL-BRW1&ccnum=4000027891380961&expmonth=10&expyear=25&cvv=123&amount=200&country=US¤cy=USD&setup_future_usage=off_session&mandate_data[customer_acceptance][acceptance_type]=offline&mandate_data[customer_acceptance][accepted_at]=1963-05-03T04:07:52.723Z&mandate_data[customer_acceptance][online][ip_address]=in%20sit&mandate_data[customer_acceptance][online][user_agent]=amet%20irure%20esse&mandate_data[mandate_type][multi_use][amount]=7000&mandate_data[mandate_type][multi_use][currency]=USD&mandate_data[mandate_type][multi_use][start_date]=2022-09-10T00:00:00Z&mandate_data[mandate_type][multi_use][end_date]=2023-09-10T00:00:00Z&mandate_data[mandate_type][multi_use][metadata][frequency]=13&return_url={CHECKOUT_BASE_URL}/payments"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "ThreeDS ACS Emulator - Challenge Page")),
Event::Trigger(Trigger::Click(By::Id("btn1"))),
Event::Trigger(Trigger::Click(By::Id("btn5"))),
Event::Assert(Assert::IsPresent("succeeded")),
Event::Assert(Assert::IsPresent("man_")),//mandate id prefix is present
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="14" end="29">
async fn should_make_nuvei_3ds_payment(c: WebDriver) -> Result<(), WebDriverError> {
let conn = NuveiSeleniumTest {};
conn.make_redirection_payment(c, vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/card?cname=CL-BRW1&ccnum=4000027891380961&expmonth=10&expyear=25&cvv=123&amount=200&country=US¤cy=USD"))),
Event::Assert(Assert::IsPresent("Expiry Year")),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Query(By::ClassName("title"))),
Event::Assert(Assert::Eq(Selector::Title, "ThreeDS ACS Emulator - Challenge Page")),
Event::Trigger(Trigger::Click(By::Id("btn1"))),
Event::Trigger(Trigger::Click(By::Id("btn5"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(Selector::QueryParamStr, "status=succeeded")),
]).await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nuvei_ui.rs" role="context" start="6" end="6">
struct NuveiSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs<|crate|> test_utils<|connector|> nexinets_ui anchor=should_make_3ds_card_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="83" end="85">
fn should_make_3ds_card_payment_test() {
tester!(should_make_3ds_card_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="89" end="91">
fn should_make_ideal_payment_test() {
tester!(should_make_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="77" end="79">
fn should_make_paypal_payment_test() {
tester!(should_make_paypal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="55" end="73">
async fn should_make_ideal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = NexinetsSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/222"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"a.btn.btn-primary.btn-block.margin-bottm-15",
))),
Event::Assert(Assert::ContainsAny(
Selector::QueryParamStr,
vec!["status=succeeded", "status=processing"],
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs<|crate|> test_utils<|connector|> nexinets_ui anchor=should_make_paypal_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="14" end="32">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = NexinetsSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/220"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"a.btn.btn-primary.btn-block.margin-bottm-15",
))),
Event::Assert(Assert::ContainsAny(
Selector::QueryParamStr,
vec!["status=succeeded", "status=processing"],
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="55" end="73">
async fn should_make_ideal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = NexinetsSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/222"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"a.btn.btn-primary.btn-block.margin-bottm-15",
))),
Event::Assert(Assert::ContainsAny(
Selector::QueryParamStr,
vec!["status=succeeded", "status=processing"],
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="34" end="53">
async fn should_make_3ds_card_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = NexinetsSeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/221"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::SwitchFrame(By::Id("threeDSCReqIframe"))),
Event::Trigger(Trigger::SendKeys(By::Id("otp"), "1234")),
Event::Trigger(Trigger::Click(By::Css("button#sendOtp"))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::ContainsAny(
Selector::QueryParamStr,
vec!["status=succeeded", "status=processing"],
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"nexinets".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/nexinets_ui.rs" role="context" start="6" end="6">
struct NexinetsSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs<|crate|> test_utils<|connector|> adyen_uk_ui anchor=should_make_adyen_blik_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="830" end="832">
fn should_make_adyen_blik_payment_test() {
tester!(should_make_adyen_blik_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="842" end="844">
fn should_make_adyen_online_banking_thailand_payment_test() {
tester!(should_make_adyen_online_banking_thailand_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="836" end="838">
fn should_make_adyen_online_banking_fpx_payment_test() {
tester!(should_make_adyen_online_banking_fpx_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="824" end="826">
fn should_make_adyen_dana_payment_test() {
tester!(should_make_adyen_dana_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="818" end="820">
fn should_make_adyen_walley_payment_test() {
tester!(should_make_adyen_walley_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs<|crate|> test_utils<|connector|> adyen_uk_ui anchor=should_make_adyen_dana_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="824" end="826">
fn should_make_adyen_dana_payment_test() {
tester!(should_make_adyen_dana_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="836" end="838">
fn should_make_adyen_online_banking_fpx_payment_test() {
tester!(should_make_adyen_online_banking_fpx_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="830" end="832">
fn should_make_adyen_blik_payment_test() {
tester!(should_make_adyen_blik_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="818" end="820">
fn should_make_adyen_walley_payment_test() {
tester!(should_make_adyen_walley_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="811" end="813">
fn should_make_adyen_giropay_payment_test() {
tester!(should_make_adyen_giropay_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs<|crate|> test_utils<|connector|> adyen_uk_ui anchor=should_make_adyen_mbway_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="792" end="794">
fn should_make_adyen_mbway_payment_test() {
tester!(should_make_adyen_mbway_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="804" end="806">
fn should_make_adyen_onlinebanking_pl_payment_test() {
tester!(should_make_adyen_onlinebanking_pl_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="798" end="800">
fn should_make_adyen_ebanking_fi_payment_test() {
tester!(should_make_adyen_ebanking_fi_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="786" end="788">
fn should_make_adyen_wechatpay_payment_test() {
tester!(should_make_adyen_wechatpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="780" end="782">
fn should_make_adyen_bancontact_card_payment_test() {
tester!(should_make_adyen_bancontact_card_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs<|crate|> test_utils<|connector|> adyen_uk_ui anchor=should_make_adyen_ideal_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="768" end="770">
fn should_make_adyen_ideal_payment_test() {
tester!(should_make_adyen_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="780" end="782">
fn should_make_adyen_bancontact_card_payment_test() {
tester!(should_make_adyen_bancontact_card_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="774" end="776">
fn should_make_adyen_eps_payment_test() {
tester!(should_make_adyen_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="762" end="764">
fn should_make_adyen_bacs_payment_test() {
tester!(should_make_adyen_bacs_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="756" end="758">
fn should_make_adyen_sepa_payment_test() {
tester!(should_make_adyen_sepa_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs<|crate|> test_utils<|connector|> adyen_uk_ui anchor=should_make_adyen_bacs_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="762" end="764">
fn should_make_adyen_bacs_payment_test() {
tester!(should_make_adyen_bacs_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="774" end="776">
fn should_make_adyen_eps_payment_test() {
tester!(should_make_adyen_eps_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="768" end="770">
fn should_make_adyen_ideal_payment_test() {
tester!(should_make_adyen_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="756" end="758">
fn should_make_adyen_sepa_payment_test() {
tester!(should_make_adyen_sepa_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="750" end="752">
fn should_make_adyen_ach_payment_test() {
tester!(should_make_adyen_ach_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs<|crate|> test_utils<|connector|> adyen_uk_ui anchor=should_make_adyen_sepa_payment_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="756" end="758">
fn should_make_adyen_sepa_payment_test() {
tester!(should_make_adyen_sepa_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="768" end="770">
fn should_make_adyen_ideal_payment_test() {
tester!(should_make_adyen_ideal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="762" end="764">
fn should_make_adyen_bacs_payment_test() {
tester!(should_make_adyen_bacs_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="750" end="752">
fn should_make_adyen_ach_payment_test() {
tester!(should_make_adyen_ach_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_ui.rs" role="context" start="744" end="746">
fn should_make_adyen_paypal_payment_test() {
tester!(should_make_adyen_paypal_payment);
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs<|crate|> test_utils<|connector|> adyen_uk_wh_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="8" end="10">
fn get_connector_name(&self) -> String {
"adyen_uk".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="30" end="32">
fn should_make_webhook_test() {
tester!(should_make_webhook);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="13" end="27">
async fn should_make_webhook(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AdyenSeleniumTest {};
conn.make_webhook_test(
web_driver,
&format!("{CHECKOUT_BASE_URL}/saved/104"),
vec![
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
10,
"succeeded",
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs<|crate|> test_utils<|connector|> adyen_uk_wh_ui anchor=should_make_webhook kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="13" end="27">
async fn should_make_webhook(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = AdyenSeleniumTest {};
conn.make_webhook_test(
web_driver,
&format!("{CHECKOUT_BASE_URL}/saved/104"),
vec![
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
10,
"succeeded",
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="30" end="32">
fn should_make_webhook_test() {
tester!(should_make_webhook);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="8" end="10">
fn get_connector_name(&self) -> String {
"adyen_uk".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/adyen_uk_wh_ui.rs" role="context" start="5" end="5">
struct AdyenSeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs<|crate|> test_utils<|connector|> multisafepay_ui anchor=should_make_multisafepay_3ds_payment_failed_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="86" end="88">
fn should_make_multisafepay_3ds_payment_failed_test() {
tester!(should_make_multisafepay_3ds_payment_failed);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="99" end="101">
fn should_make_paypal_payment_test() {
tester!(should_make_paypal_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="93" end="95">
fn should_make_gpay_payment_test() {
tester!(should_make_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="80" end="82">
fn should_make_multisafepay_3ds_payment_success_test() {
tester!(should_make_multisafepay_3ds_payment_success);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="61" end="76">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/154"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='btn btn-msp-success btn-block']",
))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs<|crate|> test_utils<|connector|> multisafepay_ui anchor=should_make_multisafepay_3ds_payment_success_test kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="80" end="82">
fn should_make_multisafepay_3ds_payment_success_test() {
tester!(should_make_multisafepay_3ds_payment_success);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="93" end="95">
fn should_make_gpay_payment_test() {
tester!(should_make_gpay_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="86" end="88">
fn should_make_multisafepay_3ds_payment_failed_test() {
tester!(should_make_multisafepay_3ds_payment_failed);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="61" end="76">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/154"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='btn btn-msp-success btn-block']",
))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="46" end="59">
async fn should_make_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/153"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css("button[class='btn btn-default']"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs<|crate|> test_utils<|connector|> multisafepay_ui anchor=should_make_multisafepay_3ds_payment_failed kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="30" end="44">
async fn should_make_multisafepay_3ds_payment_failed(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/93"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("failed")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="61" end="76">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/154"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='btn btn-msp-success btn-block']",
))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="46" end="59">
async fn should_make_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/153"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css("button[class='btn btn-default']"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="14" end="28">
async fn should_make_multisafepay_3ds_payment_success(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/207"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"multisafepay".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="6" end="6">
struct MultisafepaySeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs<|crate|> test_utils<|connector|> multisafepay_ui anchor=should_make_gpay_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k3 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="46" end="59">
async fn should_make_gpay_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/153"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css("button[class='btn btn-default']"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="80" end="82">
fn should_make_multisafepay_3ds_payment_success_test() {
tester!(should_make_multisafepay_3ds_payment_success);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="61" end="76">
async fn should_make_paypal_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/154"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"button[class='btn btn-msp-success btn-block']",
))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="30" end="44">
async fn should_make_multisafepay_3ds_payment_failed(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/93"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("failed")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="14" end="28">
async fn should_make_multisafepay_3ds_payment_success(
web_driver: WebDriver,
) -> Result<(), WebDriverError> {
let conn = MultisafepaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/207"))),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Assert(Assert::IsPresent("succeeded")),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/multisafepay_ui.rs" role="context" start="6" end="6">
struct MultisafepaySeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs<|crate|> test_utils<|connector|> trustpay_3ds_ui anchor=get_connector_name kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=1<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"trustpay_3ds".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="39" end="41">
fn should_make_trustpay_3ds_payment_test() {
tester!(should_make_trustpay_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="14" end="34">
async fn should_make_trustpay_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = TrustpaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/206"))),
Event::Trigger(Trigger::Sleep(1)),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"button.btn.btn-lg.btn-primary.btn-block",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
|
symbol_neighborhood
|
<|meta_start|><|file|> hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs<|crate|> test_utils<|connector|> trustpay_3ds_ui anchor=should_make_trustpay_3ds_payment kind=fn pack=symbol_neighborhood lang=rust role_window=k2 hops=2<|meta_end|>
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="14" end="34">
async fn should_make_trustpay_3ds_payment(web_driver: WebDriver) -> Result<(), WebDriverError> {
let conn = TrustpaySeleniumTest {};
conn.make_redirection_payment(
web_driver,
vec![
Event::Trigger(Trigger::Goto(&format!("{CHECKOUT_BASE_URL}/saved/206"))),
Event::Trigger(Trigger::Sleep(1)),
Event::Trigger(Trigger::Click(By::Id("card-submit-btn"))),
Event::Trigger(Trigger::Click(By::Css(
"button.btn.btn-lg.btn-primary.btn-block",
))),
Event::Assert(Assert::IsPresent("Google")),
Event::Assert(Assert::Contains(
Selector::QueryParamStr,
"status=succeeded",
)),
],
)
.await?;
Ok(())
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="39" end="41">
fn should_make_trustpay_3ds_payment_test() {
tester!(should_make_trustpay_3ds_payment);
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="9" end="11">
fn get_connector_name(&self) -> String {
"trustpay_3ds".to_string()
}
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/trustpay_3ds_ui.rs" role="context" start="6" end="6">
struct TrustpaySeleniumTest;
<file_sep path="hyperswitch/crates/test_utils/tests/connectors/selenium.rs" role="context" start="24" end="29">
pub enum Event<'a> {
RunIf(Assert<'a>, Vec<Event<'a>>),
EitherOr(Assert<'a>, Vec<Event<'a>>, Vec<Event<'a>>),
Assert(Assert<'a>),
Trigger(Trigger<'a>),
}
<file_sep path="hyperswitch/migrations/2022-09-29-084920_create_initial_tables/up.sql" role="context" start="279" end="295">
phone_country_code VARCHAR(255),
description VARCHAR(255),
address JSON,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
metadata JSON,
PRIMARY KEY (customer_id, merchant_id)
);
CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_id VARCHAR(255) NOT NULL,
event_type "EventType" NOT NULL,
event_class "EventClass" NOT NULL,
is_webhook_notified BOOLEAN NOT NULL DEFAULT FALSE,
intent_reference_id VARCHAR(255),
primary_object_id VARCHAR(255) NOT NULL,
primary_object_type "EventObjectType" NOT NULL,
|
symbol_neighborhood
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.