Skip to content

Commit

Permalink
Merge pull request #772 from ScottLogic/release-10.1.0
Browse files Browse the repository at this point in the history
Release 10.1.0
  • Loading branch information
mic-smith committed Apr 11, 2016
2 parents 878a7b0 + 34c08ae commit d686e7f
Show file tree
Hide file tree
Showing 52 changed files with 1,062 additions and 635 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ This is an 'evergreen' application, each time it launches the application code i

# Development

The application is built using AngularJS and ES2016, transpiled via Babel. The charts are rendered using [d3fc](https://d3fc.io/), a Scott Logic open source project which provides a number of components that allow the creation of bespoke interactive charts. The bulk of the charting code is adapted from [BitFlux](http://scottlogic.github.io/BitFlux/), which showcases the capabilities of d3fc.
The application is built using AngularJS and ES2015, transpiled via Babel. The charts are rendered using [d3fc](https://d3fc.io/), a Scott Logic open source project which provides a number of components that allow the creation of bespoke interactive charts. The bulk of the charting code is adapted from [BitFlux](http://scottlogic.github.io/BitFlux/), which showcases the capabilities of d3fc.

The displayed data is real and provided by [Quandl](https://www.quandl.com). The application uses separate Quandl API keys for development and release to mitigate chances of crossing Quandl's [rate limits](https://www.quandl.com/docs/api?json#rate-limits).

### Initial Setup

Expand Down Expand Up @@ -49,12 +51,16 @@ grunt serve

The project is also accessible at http://localhost:5000

#### Testing

There is a [test plan](docs/TEST_PLAN.md) that covers the main features and behaviour. This should be used as a basis for testing before releasing and also the main features covered on testing PR changes.

#### Releasing

To release, run the Grunt task: `grunt release` for a major release, or `grunt bump:minor`
for a minor. This updates all the version references to a new version. Then, submit a PR
with this new version in to `dev`, and then merge it to `master`. Finally, run
`grunt deploy:upstream` or `grunt deploy`, depending on how your remotes are set up.
with this new version in to `dev`, and then merge it to `master`. Merging to master will
trigger the update of the deployed gh-pages version.

## License

Expand Down
55 changes: 43 additions & 12 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,54 @@
#!/usr/bin/env bash
set -eo pipefail
if ([ $TRAVIS_PULL_REQUEST == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ $TRAVIS_BRANCH == "dev" ] || [ $TRAVIS_BRANCH == "master" ]))

# Check for release branch - not using grep as set -e means it fails script
RELEASE_BRANCH=$(echo "$TRAVIS_BRANCH" | sed -n 's/^release\-/&/p')

#Get the release type (dev/master) from the branch name
TYPE="$TRAVIS_BRANCH"

if ([ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ "$TYPE" == "dev" ] || [ "$TYPE" == "master" ] || [ -n "$RELEASE_BRANCH" ]))
then
#Clone the latest gh-pages
git clone https://github.com/ScottLogic/StockFlux.git --branch gh-pages gh-pages

#Get line with version from the file -> get the second word -> remove quotes around the value
VERSION=$(grep "version" package.json | awk -v N=$2 '{print $2}' | cut -d \" -f2)
echo "Version is: $VERSION"

#Get line with the release type (develop/master) from the file -> get the second word -> remove quotes around the value
TYPE=$(grep "type" package.json | awk -v N=$2 '{print $2}' | cut -d \" -f2)
echo "Type is: $TYPE"
echo "Version is: $VERSION"

if ([ -z "$TYPE" ] || [ -z "$VERSION" ])
if ([ $TYPE == "master" ] || [ $TYPE == "dev" ])
then
echo "Version or Type not set in package.json"
exit 1
echo "Preparing to build version $TYPE"
grunt ci --build-target=$TYPE

rm -rf "./gh-pages/$TYPE"
cp -r "./public" "./gh-pages/$TYPE"
fi

if ([ $TYPE == "master" ] || [ -n "$RELEASE_BRANCH" ])
then
echo "On $TYPE - building versioned build"
if ([ -z "$VERSION" ])
then
echo "Unable to determine version from package.json."
exit 1
fi
if [ -n "$RELEASE_BRANCH" ]
then
#For release branches add rc postfix
VERSION="$VERSION-rc"
echo "Release branch - updating version to $VERSION"
fi
# Rebuild everything to do $VERSION
echo "Cleaning build. Targetting $VERSION"
grunt ci --build-target=$VERSION

rm -rf "./gh-pages/$VERSION"
cp -r "./public" "./gh-pages/$VERSION"
fi

rm -rf "./gh-pages/$TYPE"
cp -r "./public" "./gh-pages/$TYPE"
rm -rf "./gh-pages/$VERSION"
cp -r "./public" "./gh-pages/$VERSION"
cd gh-pages

#Removing git history
Expand All @@ -42,6 +68,11 @@ then
# repo's gh-pages branch. (All previous history on the gh-pages branch
# will be lost, since we are overwriting it.) We redirect any output to
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
echo "Pushing to: https://${GH_TOKEN}@${GH_REF}"
echo "Pushing to Github..."
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1

echo "Cleaning residual gh-pages folder"
rm -rf ./gh-pages
else
echo "Nothing needs deploying"
fi
80 changes: 80 additions & 0 deletions docs/TEST_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Test Plan
## Assumptions/Luxuries
You should really run full view tests using the full screen of the computer being tested AND also at a reduced size of perhaps 50% of the screen size to improve the quality of the results
The assumption is that right click is disabled and in any instance should always produce no effect.
Hover on means to move mouse cursor over an element.
Hover off means to move mouse cursor off an element.


## Task bar functionality
| |Action |Favourites (FV) | Search (FV) | Favourites (CV) | Search (CV) |
|--- |--- |--- | --- | --- | --- |
| Close Button | Hover in | Close button is highlighted | "" | "" | "" |
| | Hover out | Close button highlight removed | "" | "" | "" |
| | Left click | Application Closes | "" | "" | "" |
| Minimize Button | Hover in | Minimize button is highlighted | "" | "" | "" |
| | Hover out | Minimize button highlight removed | "" | "" | "" |
| | Left click | Application Minimizes | "" | "" | "" |
| Maximize Button | Hover in | Maximize button is highlighted | "" | "" | "" |
| | Hover out | Maximize button highlight removed | "" | "" | "" |
| | Left click | Application maximizes | "" | "" | "" |
| History Button (No history) | Observe | Button should not be present | "" | "" | "" |
| History Button (unviewed history) | Observe | Button should be present highlighted | "" | "" | "" |
| | Hover in | History button is highlighted | "" | "" | "" |
| | Hover out | History button is highlighted | "" | "" | "" |
| | Left Click | List of history is displayed to user, most recent first. | "" | "" | "" |
| | Exiting history | Button should lose highlight. | "" | "" | "" |
| History Button (viewed history) | Observe | Button should be present and not highlighted | "" | "" | "" |
| | hover in | History button is highlighted | "" | "" | "" |
| | hover out | History button highlight is removed | "" | "" | "" |
| | Left Click | List of history is displayed to user, most recent first. | "" | "" | "" |
| | Exiting history | Button remain unhighlighted. | "" | "" | "" |
| Compact View Button | Hover in | CW button is highlighted | "" | N/A | "" |
| | Hover out | CW button highlight removed | "" | N/A | "" |
| | Left click | Changes view to CV | "" | N/A | "" |
| Full View Button | Hover in | N/A | "" | FW button is highlighted | "" |
| | Hover out | N/A | "" | FW button highlight is removed | "" |
| | Left Click | N/A | "" | Changes view to FV | "" |


### Favourites
|Action |Favourites (FV) | Search (FV) | Favourites (CV) | Search (CV) |
|---|---|---|---|---|
| Before First favourite is added | Should contain no stocks and display the text "You have no favourites to display. Use the search tab to add new stocks to the list" | Should display nothing if the search field is empty | Should contain no stocks and display the text "You have no favourites to display. Use the search tab to add new stocks to the list" | Should display nothing if the search field is empty |
| Add *first* favourite | The favourite should be displayed in favourites list, the stock should be automatically selected and the chart and navigation bar for it opened. | The newly added favourite should be displayed in favourites list at the bottom if search field is empty | The newly added favourite should be displayed in favourites list | The newly added favourite should be displayed in favourites list at the bottom if search field is empty |
| Add *another* favourite | The newly added favourite should be displayed in favourites list at the bottom | The newly added favourite should be displayed in favourites list at the bottom if search field is empty | The newly added favourite should be displayed in favourites list at the bottom | The newly added favourite should be displayed in favourites list at the bottom if search field is empty |
| Left click on a favourite stock star symbol | Should display a confirmation dialog asking the user to confirm they wish to remove the stock | The stock should be unfavourited and should not be displayed in the favourites list | Should display a confirmation dialog asking the user to confirm they wish to remove the stock | The stock should be unfavourited and should not be displayed in the favourites list |
| Left click on confirm button when removing stock | The stock should be unfavourited and should not be displayed in the favourites list | N/A | The stock should be unfavourited and should not be displayed in the favourites list | N/A |
| Left click anywhere on page other than confirm button when removing stock | The stock should not be unfavourited and should still be displayed in the favourites list | N/A | The stock should not be unfavourited and should still be displayed in the favourites list | N/A|
| Hover on a favourite stock | Should change the background colour of the hovered favourite to dark grey | "" | "" | "" |
| Hover off a favourite stock | Should change the background colour of the hovered out favourite back to light grey | "" | "" | "" |
| Hover on a favourite stock with long list of favourites | Should change the background colour of the hovered favourite to dark grey. The favourite stock labels should shift right allowing a scroll bar to appear without colliding with the text. Scrolling up/down the list should allow navigating favourites list. | "" | Should change the background colour of the hovered favourite to dark grey. Scroll bar should appear to allow scrolling up/down the list. | "" |
| Hover off a favourite stock with long list of favourites | Should change the background colour of the hovered out favourite back to light grey, the scroll bar should disappear. The text labels should return to their default location | "" | Should change the background colour of the hovered out favourite back to light grey, the scroll bar should disappear. | "" |
| Left click a favourite stock | Favourite should become "selected". Dark grey background should remain even after hover out. Chart and Navi bar should be displayed of the selected favourite. | "" | Stock should not be selected | "" |
| Double left click a favourite stock | Favourite should become "selected". Dark grey background should remain even after hover out. Chart and Navi bar should be displayed of the selected favourite. | "" | Full view should be opened. The clicked favourite should become "selected". Dark grey background should remain even after hover out. Chart and Navi bar should be displayed of the selected favourite. | Stock should not be selected |
| Hover on another favourite whilst one is selected | Selected favourite should maintain its dark grey state. Hovered favourite should also be displayed with dark grey background. | "" | Selected stock should not be dark grey in compact view | "" |
| Hover off another favourite whilst one is selected | Should maintain the dark background on selected favourite. Should change the background colour of the hovered out favourite back to light grey. | "" | N/A | "" |
| Reposition favourites by holding down left mouse button and dragging | Should move to its new position in the list. | Drag to reposition should not work in search tab | Should move to its new position in the list. | Drag to reposition should not work in search tab |
| Position refreshed | New positions should be immediately visible | "" | "" | "" |
| Maintain position | New positions should be retained if window is closed and reopened | "" | "" | "" |
| Drag a favourite out and drop else where on desktop | Favourite is removed from original window and new full window opens with favourite | "" | Favourite is removed from original window and new collapsed window opens with the favourite | "" |
| Drag a favourite out and drop on to another windows favourites | Favourite is removed from original window and moved to the other window | "" | Favourite is removed from original window and moved to the other window | "" |
| Drag the last favourite out and keep mouse down | Window should fade out whilst mouse is moving and reappear if mouse is still for a short while | "" | Window should fade out whilst mouse is moving and reappear if mouse is still for a short while | "" |
| Drag the last favourite out and drop else where on desktop | Window should move to drop location | "" | Window should move to drop location | "" |
| Drag the last favourite out and drop on to another windows favourites | Favourite should move to other window and original should stay closed and not appear in closed window list | "" | Favourite should move to other window and original should stay closed and not appear in closed window list | "" |

### Transition between Favourites FV and Search FV
| Element | Action |Result |
|---|---|---|
| Search Tab | From the favourites FV, left click the search tab | favourites tab should hide and search tab become visible. |
| Favourites Tab | From the Search FV, left click favourites tab | Search tab should hide and favourites become visible|

### Searching
| Action |Result |
|---|---|---|
| View empty search field | Should contain text "Enter stock name or symbol" |
| Enter "A" character into search field | Should remove the "Enter stock name or symbol" text and replace with the entered search term. The search results field should display "loading search results". Search results which match criteria should be displayed|
| Entering "A" character into search field and hovering on search results | A scroll bar should become visible down the left side of the search results to allow scrolling down the long list. Dragging it should scroll down the list. The stock hovered over should receive dark grey highlighting. |
| Entering "complicated" into search field | No search results should be found. The search results box should display "Oops! looks like no matches were found."|
| Entering "two" into search field and hovering on results | Should display less results than are needed for a scroll bar to appear on hover. The stock hovered over should receive dark grey highlighting.|
| Entering a search query, closing the search tab and then reopening it| The previous search results should remain on the screen. Long search result lists will be displayed from the first element (not to where you scrolled in the list)|
Loading

0 comments on commit d686e7f

Please sign in to comment.