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

wrap up and tests for flow trigger action #12938

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

tmbo
Copy link
Member

@tmbo tmbo commented Oct 24, 2023

Proposed changes:

  • refactored flow trigger action
  • added tests

fixes https://rasahq.atlassian.net/browse/ENG-584

@tmbo tmbo requested a review from a team as a code owner October 24, 2023 09:39
@@ -22,54 +22,81 @@
structlogger = structlog.get_logger(__name__)


class FlowTriggerAction(action.Action):
"""Action which implements and executes the form logic."""
class ActionTriggerFlow(action.Action):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to align with other trigger action

@tmbo tmbo removed the request for review from a team October 24, 2023 09:40
Copy link
Contributor

@twerkmeister twerkmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one suggestion

assert len(event.value) == 2
assert event.value[1]["type"] == UserFlowStackFrame.type()
assert event.value[1]["flow_id"] == "foo"
assert event.value[1]["frame_type"] == FlowStackFrameType.INTERRUPT.value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also test that it's a regular frame when there is nothing there yet :)

@tmbo tmbo merged commit 513f42f into dm2 Oct 27, 2023
34 of 36 checks passed
@tmbo tmbo deleted the ENG-584-wrap-up-flow-trigger-action-refactor-tests-review branch October 27, 2023 11:28
@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug C 4 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 54 Code Smells

0.0% 0.0% Coverage
0.8% 0.8% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants