Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test action button that just has a URL, not a da event #200

Closed
plocket opened this issue Apr 5, 2021 · 2 comments
Closed

Test action button that just has a URL, not a da event #200

plocket opened this issue Apr 5, 2021 · 2 comments
Labels
reopen We won't be taking care of this any time soon. testing Tests for this framework

Comments

@plocket
Copy link
Collaborator

plocket commented Apr 5, 2021

Don't throw an error. Not sure what the encoded name would be, though.

@plocket plocket assigned plocket and unassigned plocket Apr 5, 2021
@plocket plocket added the testing Tests for this framework label Jun 30, 2021
@BryceStevenWilley
Copy link
Collaborator

I don't know if this is the exact purpose of this issue, but I couldn't find a closer one. I'm trying to just press an action button, that has a specific url_ask passed in.

Without using the manual id_tag attribute of action_button_html there's no easy way to find a given button. Here's an example of an action_button_html gets you by default:

${ action_button_html(url_ask(
    [{'recompute': ['create_attorney', 'show_resp']}]),
    label="Create Attorney") }
<a data-linknum="346" 
  data-embaction="eyJhY3Rpb24iOiAiX2RhX2ZvcmNlX2FzayIsICJhcmd1bWVudHMiOiB7InZhcmlhYmxlcyI6IFt7ImFjdGlvbiI6ICJfZGFfdW5kZWZpbmUiLCAiYXJndW1lbnRzIjogeyJ2YXJpYWJsZXMiOiBbImNyZWF0ZV9hdHRvcm5leSIsICJzaG93X3Jlc3AiXX19LCB7ImFjdGlvbiI6ICJfZGFfY29tcHV0ZSIsICJhcmd1bWVudHMiOiB7InZhcmlhYmxlcyI6IFsiY3JlYXRlX2F0dG9ybmV5IiwgInNob3dfcmVzcCJdfX1dfX0" 
  href="/run/EFSPIntegration/admin_interview/?action=eyJhY3Rpb24iOiAiX2RhX2ZvcmNlX2FzayIsICJhcmd1bWVudHMiOiB7InZhcmlhYmxlcyI6IFt7ImFjdGlvbiI6ICJfZGFfdW5kZWZpbmUiLCAiYXJndW1lbnRzIjogeyJ2YXJpYWJsZXMiOiBbImNyZWF0ZV9hdHRvcm5leSIsICJzaG93X3Jlc3AiXX19LCB7ImFjdGlvbiI6ICJfZGFfY29tcHV0ZSIsICJhcmd1bWVudHMiOiB7InZhcmlhYmxlcyI6IFsiY3JlYXRlX2F0dG9ybmV5IiwgInNob3dfcmVzcCJdfX1dfX0" 
  class="btn btn-sm btn-success btn-darevisit">
    Create attorney
</a>

Where the data-embaction is {\"action\": \"_da_force_ask\", \"arguments\": {\"variables\": [{\"action\": \"_da_undefine\", \"arguments\": {\"variables\": [\"create_attorney\", \"show_resp\"]}}, {\"action\": \"_da_compute\", \"arguments\": {\"variables\": [\"create_attorney\", \"show_resp\"]}}]}}" encoded into base64.

Related conversation here: https://cfb-public.slack.com/archives/CQ8RWCH17/p1648761462993049

@plocket
Copy link
Collaborator Author

plocket commented Apr 1, 2022

This issue was actually a much simpler one about plain old urls for action buttons. This description is much more interesting and I'm alright sharing this issue for both of these if you are.

Easiest solution for us is to require folks to use an id_tag. Beyond that, I don't know all the possible configurations that action_button_html(url_ask()) can construct, but it's json and we could parse it. For example, the innermost property I see in the above is ["create_attorney", "show_resp"]. That seems like something that a user could provide, though we'd have to think about what that sentence would look like.

@plocket plocket added the reopen We won't be taking care of this any time soon. label Oct 1, 2024
@plocket plocket closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reopen We won't be taking care of this any time soon. testing Tests for this framework
Projects
None yet
Development

No branches or pull requests

2 participants