-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #995 from OpenFn/issue951
Ensure credentials are reloaded after a new credential was made
- Loading branch information
Showing
7 changed files
with
107 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
defmodule LightningWeb.CredentialLiveHelpers do | ||
import Phoenix.LiveViewTest | ||
|
||
def select_credential_type(live, type) do | ||
live | ||
|> form("#credential-type-picker", type: %{selected: type}) | ||
|> render_change() | ||
end | ||
|
||
def click_continue(live) do | ||
live | ||
|> element("button", "Continue") | ||
|> render_click() | ||
end | ||
|
||
def fill_credential(live, params) when is_map(params) do | ||
live | ||
|> form("#credential-form", credential: params) | ||
|> render_change() | ||
end | ||
|
||
def click_save(live, form_data \\ %{}) do | ||
live | ||
|> form("#credential-form", form_data) | ||
|> render_submit() | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters