Open abalakh opened 6 years ago
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.
@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?
Currently we do have
Login
as entity with methods likelogin
andlogout
. 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
andLogout
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.