Feature: SSO Manager management
As admin
I can create, edit and delete SSO Provider

@auth @deletessoprovider @logout
Scenario: Creating and editing new SSO Provider
	Given I create a new SSO Provider
		| Name             | ClientID                                                                 | ClientSecret                        | ValidIssuer                 | AuthorisationEndpoint                     | TokenEndpoint                       | IsPublic |
		| TestSssoProvider | 778899937320-phjl4hpacmeele7k92650u5q73n66cqe.apps.googleusercontent.com | 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 | https://accounts.google.com | https://accounts.google.com/o/oauth2/auth | https://oauth2.googleapis.com/token | true     |
	Then new SSO Provider is present on the list
	When I edit existing SSO Provider
		| Name                    | ClientID                                                           | ClientSecret                        | ValidIssuer                        | AuthorisationEndpoint                            | TokenEndpoint                              | IsPublic |
		| EDITED_TestSssoProvider | EDITED-phjl4hpacmeele7k92650u5q73n66cqe.apps.googleusercontent.com | EDITED-LtmAS3XnPIQ4ok3y-3CpWCN5w5X7 | https://accounts.google.com/EDITED | https://accounts.google.com/o/oauth2/auth/EDITED | https://oauth2.googleapis.com/token/EDITED | false    |
	Then I check edited data on SSO Provider page
	And I check Sso Manager Audit logs
		| Timing | UserName | Comment | EntityDisplayName    | Type   | DisplayName          | Changes |
		|        |          |         | scenarioDataInstance | Update | scenarioDataInstance |         |

@auth @logout
Scenario: Creating and deleting new SSO Provider
	Given I create a new SSO Provider
		| Name             | ClientID                                                                 | ClientSecret                        | ValidIssuer                 | AuthorisationEndpoint                     | TokenEndpoint                       | IsPublic |
		| TestSssoProvider | 778899937320-phjl4hpacmeele7k92650u5q73n66cqe.apps.googleusercontent.com | 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 | https://accounts.google.com | https://accounts.google.com/o/oauth2/auth | https://oauth2.googleapis.com/token | false    |
	Then new SSO Provider is present on the list
	When I delete existing SSO Provider
	Then new SSO Provider is not present on the list
	And I check Sso Manager Audit logs
		| Timing | UserName | Comment | EntityDisplayName | Type   | DisplayName          | Changes |
		|        |          |         |                   | Delete | scenarioDataInstance |         |

@auth @createssoprovider @deletessoprovider @logout
Scenario: Creating a new SSO Provider through api and check audit logs
	Then I check Sso Manager Audit logs
		| Timing | UserName | Comment | EntityDisplayName    | Type   | DisplayName          | Changes |
		|        |          |         | scenarioDataInstance | Create | scenarioDataInstance |         |