Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
test(connector): [Nexinets] Add UI test for Nexinets Payment methods (#1784)
chikke srujanbf62a7c9ad8e
diff --git a/.github/workflows/connector-ui-sanity-tests.yml b/.github/workflows/connector-ui-sanity-tests.ymlindex 407687c9de..7a991437fc 100644--- a/.github/workflows/connector-ui-sanity-tests.yml+++ b/.github/workflows/connector-ui-sanity-tests.yml@@ -70,7 +70,7 @@ jobs:connector:# do not use more than 2 runners, try to group less time taking connectors together- stripe,airwallex,bluesnap,checkout,trustpay_3ds,payu,authorizedotnet,aci,noon- - adyen_uk,shift4,worldline,multisafepay,paypal,mollie+ - adyen_uk,shift4,worldline,multisafepay,paypal,mollie,nexinetssteps:diff --git a/.typos.toml b/.typos.tomlindex 85e4b5f996..2a102ed908 100644--- a/.typos.toml+++ b/.typos.toml@@ -17,6 +17,7 @@ SOM = "SOM" # Somalia country codeTHA = "THA" # Thailand country codeZAR = "ZAR" # South African Rand currency codepassord = "passord" # name of a css class for adyen ui test+bottm = "bottm" # name of a css class for nexinets ui testklick = "klick" # Swedish word for clicksoptin = "optin" # Boku preflow nameoptin_id = "optin_id" # Boku's id for optin flowdiff --git a/crates/router/tests/connectors/main.rs b/crates/router/tests/connectors/main.rsindex 948552bdc8..c4225dbedd 100644--- a/crates/router/tests/connectors/main.rs+++ b/crates/router/tests/connectors/main.rs@@ -40,6 +40,7 @@ mod mollie_ui;mod multisafepay;mod multisafepay_ui;mod nexinets;+mod nexinets_ui;mod nmi;mod noon;mod noon_ui;diff --git a/crates/router/tests/connectors/nexinets_ui.rs b/crates/router/tests/connectors/nexinets_ui.rsnew file mode 100644index 0000000000..fd80d3a4ae--- /dev/null+++ b/crates/router/tests/connectors/nexinets_ui.rs@@ -0,0 +1,91 @@+use serial_test::serial;+use thirtyfour::{prelude::*, WebDriver};++use crate::{selenium::*, tester};++struct NexinetsSeleniumTest;++impl SeleniumTest for NexinetsSeleniumTest {+ fn get_connector_name(&self) -> String {+ "nexinets".to_string()+ }+}++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!("{CHEKOUT_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(())+}++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!("{CHEKOUT_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(())+}++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!("{CHEKOUT_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(())+}++#[test]+#[serial]+fn should_make_paypal_payment_test() {+ tester!(should_make_paypal_payment);+}++#[test]+#[serial]+fn should_make_3ds_card_payment_test() {+ tester!(should_make_3ds_card_payment);+}++#[test]+#[serial]+fn should_make_ideal_payment_test() {+ tester!(should_make_ideal_payment);+}