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

chore: rename step att of OnboardingStep to name #101

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alice/onboarding/enums/onboarding_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class OnboardingStepName(str, Enum):


class OnboardingStep(BaseModel):
step: OnboardingStepName
name: OnboardingStepName
config: Union[Dict[str, Any], None] = None
10 changes: 5 additions & 5 deletions tests/test_integration_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_should_return_an_error_when_the_api_key_is_not_configured():
onboarding = Onboarding.from_config(config)

result = onboarding.create_flow(
steps=[OnboardingStep(step=OnboardingStepName.SELFIE)],
steps=[OnboardingStep(name=OnboardingStepName.SELFIE)],
default=True,
name="test",
)
Expand All @@ -26,7 +26,7 @@ def test_should_timeout_when_time_exceeded(given_valid_api_key):
onboarding = Onboarding.from_config(config)

result = onboarding.create_flow(
steps=[OnboardingStep(step=OnboardingStepName.SELFIE)],
steps=[OnboardingStep(name=OnboardingStepName.SELFIE)],
default=True,
name="test",
)
Expand All @@ -42,7 +42,7 @@ def do_complete_flow() -> Result[bool, Error]:
onboarding = Onboarding.from_config(config)

flow_id = onboarding.create_flow(
steps=[OnboardingStep(step=OnboardingStepName.SELFIE)],
steps=[OnboardingStep(name=OnboardingStepName.SELFIE)],
default=False,
name="alice-flow-test-onboarding-python",
).unwrap_or_return()
Expand All @@ -62,8 +62,8 @@ def do_complete_flow() -> Result[bool, Error]:
_ = onboarding.update_flow(
flow_id=flow_id,
steps=[
OnboardingStep(step=OnboardingStepName.SELFIE),
OnboardingStep(step=OnboardingStepName.IDCARD),
OnboardingStep(name=OnboardingStepName.SELFIE),
OnboardingStep(name=OnboardingStepName.IDCARD),
],
default=False,
name="alice-flow-test-onboarding-python-updated",
Expand Down
Loading