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

Login: Entity or NavigateStep? #20

Open
abalakh opened this issue Feb 22, 2018 · 2 comments
Open

Login: Entity or NavigateStep? #20

abalakh opened this issue Feb 22, 2018 · 2 comments
Labels
low question Further information is requested

Comments

@abalakh
Copy link
Contributor

abalakh commented Feb 22, 2018

Currently we do have Login as entity with methods like login and logout. Session calls those methods in __enter__() and __exit__() accordingly. That's basically the approach robottelo is using.

CFME and navmazing use different one though - Login and Logout are NavigateSteps, so navigator handles logging in and logging out if necessary.

Question is - do cfme's way introduce some valuable benefits or that's basically just another equal approach? Should we use it or stay with what we have?

I was thinking about that and couldn't highlight any serious benefits of either approach. The only thing is cfme's way will allow us to ensure we're logged in before proceeding with navigation to desired page. On the other hand it introduces extra prerequisite for top-level navigate steps. And since Satellite6 doesn't have any actions which could lead user to appear accidentally logged out of application there's not much value in it, more than that - if some action will close user's session i'd like to catch such bug and not to hide it with navmazing.

@oshtaier @mfalesni @jhutar let's discuss.

@abalakh abalakh added question Further information is requested low labels Feb 22, 2018
@mfalesni
Copy link
Contributor

Okay, so, you only need LoginPage and then let's say LoggedInPage nav steps. Nothing more. When you test logging in and logging out, you can have helper methods that log in and log out on the views, you just do login_view = navigate_to(session, 'LoginPage') and then you can have a method on the view to log in certain way. Same with the logged in page. You are logged in and then you use a method on the view to log out.

@jhutar
Copy link
Member

jhutar commented Feb 23, 2018

@mfalesni , by implementing that, would navigation module hide potential issue when some action (for some reason I can not imagine) logs me out during the test as @abalakh mentions above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants