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