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

adding RobotFramework tests for iDrop Swing application #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
165 changes: 165 additions & 0 deletions tests/RFTests/Add-Delete_Grids.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
*** Settings ***
Resource ../iDrop_resource.txt

*** Test Cases ***
Launch iDrop
[Tags] smoke iDrop
Start Application In Separate Thread org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
Sleep 5s
List Windows
Comment The Pass Phrase dialog window should already be open
Select Dialog passPhraseDialog
Insert Into Text Field passPhrase ${Password}
Push Button btnOk
Select Dialog gridMemoryDialog
Comment The Grid window should already be open
${TableRowCount} = Get Table Row Count gridTable
Log ${TableRowCount}
${HostRow} = Find Row by Hostname ${iRODSHost} ${UserName}
Log ${HostRow}
Select Table Cell gridTable ${HostRow} Host
Comment Push Button btnLogIn
Comment Comment Sleep 5s

Launch iDrop
[Tags] smoke iDrop RegSkip skipped
Open iDrop Main Window

Open Grid Select dialog
[Tags] smoke iDrop skipped
Comment The MainScreen dialog window should already be open
Select Window idropMainGui
Push Button btnGrids
Select Dialog gridMemoryDialog
Sleep 10s

Open Add New Grid dialog
[Tags] smoke iDrop
Comment The iDrop: Grid Accounts dialog window should already be open
Push Button btnAddGrid
Select Dialog gridInfoDialog
List Windows
List Components In Context formatted

Verify iDrop: Grid Accounts dialog title
[Tags] smoke iDrop
Select Dialog gridInfoDialog
${TitleIs} = Get Current Context
Log ${TitleIs}
Should Be Equal As Strings ${TitleIs} Create Grid Account Information

Verify Host textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled host

Verify Host label text
[Tags] smoke iDrop skipped
${output} = Get Label Content lblHost
Should Be Equal As Strings ${output} Host:

Verify Port textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled port

Verify Port label text
[Tags] smoke iDrop skipped
${output} = Get Label Content lblPort
Should Be Equal As Strings ${output} Port:

Verify Zone textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled zone

Verify Zone label text
[Tags] smoke iDrop
${output} = Get Label Content lblZone
Should Be Equal As Strings ${output} Zone:

Verify User textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled user

Verify User label text
[Tags] smoke iDrop
${output} = Get Label Content lblUser
Should Be Equal As Strings ${output} User:

Verify Password textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled password

Verify Password label text
[Tags] smoke iDrop
${output} = Get Label Content lblPassword
Should Be Equal As Strings ${output} Password:

Verify Default Resource textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled host

Verify Default Resource label text
[Tags] smoke iDrop
${output} = Get Label Content lblDefaultResource
Should Be Equal As Strings ${output} Default Resource:

Verify Starting Collection textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled startingCollection

Verify Starting Collection label text
[Tags] smoke iDrop
${output} = Get Label Content lblStartingCollection
Should Be Equal As Strings ${output} Starting Collection:

Verify Authorization Scheme combobox enabled
[Tags] smoke iDrop skipped
Combo Box Should Be Enabled STANDARD

Verify Authorization Scheme combobox values
[Tags] smoke iDrop skipped
${output} = Get Combobox Values STANDARD

Verify Comment textbox enabled
[Tags] smoke iDrop
Text Field Should Be Enabled comment

Verify Comment label text
[Tags] smoke iDrop
${output} = Get Label Content lblComment
Should Be Equal As Strings ${output} Comment:

Verify Error message failure to create grid
[Tags] smoke iDrop
Insert Into Text Field host ${iRODSHost}
Insert Into Text Field zone ${Zone}
Insert Into Text Field user ${UserName}
Insert Into Text Field password ${Password}
Insert Into Text Field startingCollection /${Zone}/home/${UserName}
Insert Into Text Field comment Simple test comment for Grid entry
Comment Sleep 10s
Push Button btnOK
List Components In Context
List Windows
Dialog Should Be Open dialog0
Select Dialog dialog0
${ErrorMsgText} = Get Label Content OptionPane.label
Should Be Equal As Strings ${ErrorMsgText} Unable to process login, the server or account appears to be invalid
Button Should Exist OptionPane.button
${ButtonText} = Get Button Text OptionPane.button
Should Be Equal As Strings ${ButtonText} OK
Verify Tooltip Text OptionPane.button None
Button Should Be Enabled OptionPane.button
Push Button OptionPane.button

Delete Grid
[Tags] smoke iDrop skipped
Select Dialog gridMemoryDialog
${TitleIs} = Get Current Context
Log ${TitleIs}
Should Be Equal As Strings ${TitleIs} iDrop: Grid Accounts
Select Table Cell gridTable 3 0

*** Keywords ***
Shutdown App and Wait
Close All Dialogs
Sleep 15s
91 changes: 91 additions & 0 deletions tests/RFTests/NotReady/Initial_iDrop_Tests.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
*** Settings ***
Documentation To run SwingExplorer and iDrop
...
... java -cp $HOME/Downloads/RobotFramework_SwingLibrary/v1.9.1/SWExplorer_v1.6/swexpl.jar:$HOME/Downloads/RobotFramework_SwingLibrary/v1.9.1/SWExplorer_v1.6/swag.jar:idrop-swing-2.0.1-RC1.jar:dependency/* org.swingexplorer.Launcher org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
...
... To Define CLASSPATH for testing
... export CLASSPATH=/Applications/iDrop\ Transfer\ Manager.app/Contents/java/app/idrop-swing-2.0.1-RC1.jar:dependency/*:/Users/jerry/Downloads/RobotFramework_SwingLibrary/v1.9.1/swinglibrary-1.9.1.jar
Resource ../../iDrop_resource.txt

*** Test Cases ***
PlaceHolder iDrop Test Suite
[Tags] functional iDrop skipped
Comment Define variables to be used

Running Yet orig
[Tags] functional iDrop skipped
Comment Try to start iDrop application
Comment Start iDrop Application
Comment Set Environment Variable CLASSPATH %{CLASSPATH}:/Applications/iDrop\ Transfer\ Manager.app/Contents/java/app/idrop-swing-2.0.1-RC1.jar:dependency/*
${output} = Run set \| grep CLASSPATH
Log ${output}
Comment Launch Application org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
Start Application In Separate Thread org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
Sleep 5s
Comment Select Dialog class=org.irods.jargon.idrop.desktop.systraygui.LoginDialog
Comment Select Dialog ${EMPTY}
Comment Select Dialog name=dialog0
Comment Close Dialog dialog0
List Windows
Comment Select Window frame0
Select Dialog iDrop: Enter Pass Phrase
List Components In Context
List Components In Context formatted
Insert Into Text Field passPhrase ${Password}
Push Button OK
Comment Close All Dialogs
Comment Select Window regexp=^Login.*
Comment Select Dialog LoginDialog()
Comment Insert Into Text Field JTextField() ${UserName}
Comment Insert Into Text Field JPasswordField() ${Password}
Comment Push Button JButton()
Comment Simple check to see if iDrop launches okay
Comment Insert Into Text Field LoginDialog[0]/JRootPane[1]/JLayeredPane[0]/JPanel[0]/JPanel[9]/JTextField ${UserName}
Comment Insert Into Text Field LoginDialog[0]/JRootPane[1]/JLayeredPane[0]/JPanel[0]/JPanel[11]/JPasswordField ${Password}
Comment Push Button LoginDialog[0]/JRootPane[1]/JLayeredPane[0]/JPanel[1]/JPanel[1]/JButton

Running Yet
[Tags] functional iDrop
Comment Try to start iDrop application
Comment Start iDrop Application
Comment Set Environment Variable CLASSPATH %{CLASSPATH}:/Applications/iDrop\ Transfer\ Manager.app/Contents/java/app/idrop-swing-2.0.1-RC1.jar:dependency/*
${output} = Run set \| grep CLASSPATH
Log ${output}
Comment Launch Application org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
Start Application In Separate Thread org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
Sleep 5s
List Windows
Select Dialog iDrop: Enter Pass Phrase
List Components In Context
List Components In Context formatted
Button Should Exist Cancel
Button Should Exist I Forgot
Button Should Exist OK
Component Should Exist passPhrase
Insert Into Text Field passPhrase ${Password}
Push Button OK
Select Dialog iDrop: Grid Accounts
List Components In Context
List Components In Context formatted
Button Should Exist btnAddGrid
Button Should Exist btnDeleteGrid
Button Should Exist btnEditGrid
Button Should Exist btnCancel
Button Should Exist btnLogIn

is it running yet
[Tags] functional iDrop skipped
Comment Try to start iDrop application
Start iDrop Application
Comment Simple check to see if iDrop launches okay
Insert Into Text Field LoginDialog[0]/JRootPane[1]/JLayeredPane[0]/JPanel[0]/JPanel[9]/JTextField ${UserName}
Insert Into Text Field LoginDialog[0]/JRootPane[1]/JLayeredPane[0]/JPanel[0]/JPanel[11]/JPasswordField ${Password}
Push Button LoginDialog[0]/JRootPane[1]/JLayeredPane[0]/JPanel[1]/JPanel[1]/JButton

*** Keywords ***
Start iDrop Application
Comment Set Environment Variable CLASSPATH "$CLASSPATH:/Applications/iDrop Transfer Manager.app/Contents/java/app/idrop-swing-2.0.1-RC1.jar:dependency/*"
Comment Set Environment Variable CLASSPATH %{CLASSPATH}:/Applications/iDrop\ Transfer\ Manager.app/Contents/java/app/idrop-swing-2.0.1-RC1.jar:dependency/*
${output} = Run set \| grep CLASSPATH
Log ${output}
Launch Application org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop
Loading