Integration Testing 

Due to the nature of the program, integration testing was done manually and not by a script. Listed below are the tests run for the interaction among pages.

Note that we do have some code that ran initial testing of functions with constant leagueIDs, userIDs, etc., which we have included in our submission.
------------------------------
Test: Successfully place order (Trade)

	Affects: Portfolio
	-'Pending Orders' is updated by adding the corresponding order


Test: Make a successful trade (Trade)

	Affects: Home
	-Cash balance and gain percentage should be updated on the home page

	Affects: Portfolio
	-'Pending Orders' is updated by removing the corresponding order, 'Transaction History' and main porfolio page are updated by adding the corresponding trade


Test: Successfully create a league (League)

	Affects: Home
	-A portfolio for that league should be displayed on the home page of the creator, 'League Details' should be displayed and able to be viewed, 
	'Invite Friends' should be displayed and able to be accessed for the creator

	Affects: Trade
	-Trades not abiding to league settings are considered invalid and do not go through
	-Trades abiding to League settings are considered valid and go through

	Affects: Portfolio
	-Cash balance should be set to the selected amount during league creation


Test: Accept a league invitation (League)

	Affects: Home 
	-A portfolio for that league should be displayed on the home page, 'League Details' should be able to be viewed

	Affects: Trade
	-Trades not abiding to league settings are considered invalid and do not go through
	-Trades abiding to League settings are considered valid and go through

	Affects: Portfolio
	-Case balance should be set to the current amount selected in league settings


Test: Update league settings (League)

	Affects: Home
	-Viewing 'League Details" from the home page should show the update for everyone in the league
	-Editing league name: Successfully changed name should be displayed for everyone in the league

	Affects: Trade
	-Update league setting 'Market Sectors Allowed' to include more sectors: Trades involving newly allowed sectors should now go through
	-update league setting 'Market Sectors Allowed' to exclude more sectors: Trades through newly disallowed sectors should not go through
	-Update league setting 'Trading On Margin' to 'No' : Trading on margin will now be considered invalid and not go through
	-Update league setting 'Trading On Margin' to 'Yes': Trading on margin will now be considered valid and go through


Test: Successfully create a fund (Fund)

	Affects: Home
	-A portfolio for that fund should be displayed on the home page of the creator, fund settings should be able to be viewed

	Affects: Portfolio
	-Cash balance should be set to $1,000,000.00

	Affects: Trade
	-If mutual fund, trading on margin and short selling will now be considered invalid and not go through
	-If hedge fund, trades abiding to margin ratio are considered invalid and do not go through
	-If hedge fund, trades not abiding to margin ratio are considered valid and go through


Test: Update fund settings (Fund)


	Affects: Home
	-Viewing 'Fund Details' from the home page should show the update
	-Edit a fund name: Successfully changed name should be displayed

	Affects: Trade
	-Update fund setting 'Allow Short Selling' to 'No' : Short selling will now be considered invalid and not go through
	-Update fund setting 'Allow Short Selling' to 'Yes': Short selling will now be considered valid and go through
	-Update fund setting 'Margin Ratio' to a ratio: Trades exceeding the margin ratio will now be considered invalid and not go through
	-Update fund setting 'Margin Ratio' to 'No Margin': Trading on margin will now be considered invalid and not go through
	
Test: Invest in a Fund (Fund)

	Affects: Investments
	-Viewing 'Investments' from home page shuold show the update
	-Amount and investor should be displayed allow with accept and decline
	
	Affects: Portfolio
	-Under fund investments there should be an entry with the fund investment (if the fund manager accepted)
	-The current worth should change depending on how the fund is doing financially
	
Test: Join a Public League (League)
	
	Affects: Home
	-Viewing the home page should have new league added to portfolios if not already existing
	

