Closed
Bug 566505
Opened 15 years ago
Closed 13 years ago
Review test for log in
Categories
(Testing Graveyard :: WebQA, defect)
Testing Graveyard
WebQA
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: krupa.mozbugs, Unassigned)
Details
Attachments
(4 files)
|
1.02 KB,
patch
|
vish_moz
:
review+
|
Details | Diff | Splinter Review |
|
50.31 KB,
text/x-python-script
|
Details | |
|
1.05 KB,
text/x-python-script
|
Details | |
|
1.08 KB,
patch
|
Details | Diff | Splinter Review |
This is a simple test case which checks user log in.It uses the general login function from AMOfunctions
Attachment #445856 -
Flags: review?(vish.mozilla)
Attachment #445856 -
Flags: review?(trumanwsmith)
Attachment #445856 -
Flags: review?(stephen.donner)
Attachment #445856 -
Flags: review?(mozbugs.retornam)
| Reporter | ||
Comment 1•15 years ago
|
||
You need AMOfunctions to run the testcase
Updated•15 years ago
|
Attachment #445856 -
Attachment is patch: true
Attachment #445856 -
Attachment mime type: text/html → text/plain
Comment 2•15 years ago
|
||
ret = amo_fcns.login('userNonAdm',sel)
if ret == amo_fcns.functionPass:
print "Log in was successful"
else:
print "Login failed"
change else to
else:
unittest.TestCase.fail('some msg')
| Reporter | ||
Comment 3•15 years ago
|
||
I have made the changes you suggested.thanks
Attachment #446044 -
Flags: review?(vish.mozilla)
Comment 4•15 years ago
|
||
change this line:
ret = amo_fcns.login('userNonAdm',sel)
to:
ret = amo_fcns.login(self.tc_params.userNonAdm,sel)
if you want to run the script for just 1 user type.
If you want to run for diff usertypes the you should use a loop like:
for userType in self.tc_params.userTypeList:
ret = amo_fcns.login(userType,sel)
If you don't want to make it too complicated and not use object oriented stuff then just use:
ret = amo_fcns.login(1,sel)
(for non-admin user)
Updated•15 years ago
|
Attachment #445856 -
Flags: review?(vish.mozilla) → review+
| Reporter | ||
Comment 5•15 years ago
|
||
(In reply to comment #4)
> change this line:
> ret = amo_fcns.login('userNonAdm',sel)
> to:
> ret = amo_fcns.login(self.tc_params.userNonAdm,sel)
> if you want to run the script for just 1 user type.
>
>
> If you want to run for diff usertypes the you should use a loop like:
> for userType in self.tc_params.userTypeList:
> ret = amo_fcns.login(userType,sel)
>
> If you don't want to make it too complicated and not use object oriented stuff
> then just use:
> ret = amo_fcns.login(1,sel)
> (for non-admin user)
As per my discussion with Truman(and you),implementing the method suggested above will break stuff.So retaining the existing code.but I have added a few comments and improved the general formatting.Please review.
Attachment #446603 -
Flags: review?(vish.mozilla)
Comment 6•15 years ago
|
||
change this line:
if ret == amo_fcns.functionPass:
to
if ret == AMOfunctions.AMOfunctions.functionPass:
Since functionPass is a class variable, not an instance variable you can access it using the class name instead of the instance name.
everything else looks good.
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Attachment #445856 -
Flags: review?(trumanwsmith)
Attachment #445856 -
Flags: review?(stephen.donner)
Attachment #445856 -
Flags: review?(mozbugs.retornam)
Updated•7 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•