from behave import given, when, then @given("a valid test user") def step_impl(context): context.username = context.user.username context.password = context.user.password @given("I login to the {environment} app") @when("I login to the {environment} app") def step_impl(context, environment): context.login_flow.login(context, context.username, context.password) @when("I log out of my account") def step_impl(context): context.login_flow.logout(context) @then("I am taken to the login page") def step_impl(context): context.login_flow.assert_login_button()