Skip to content

Commit d686e7f

Browse files
committed
Merge pull request #772 from ScottLogic/release-10.1.0
Release 10.1.0
2 parents 878a7b0 + 34c08ae commit d686e7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1062
-635
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ This is an 'evergreen' application, each time it launches the application code i
1919

2020
# Development
2121

22-
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.
22+
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.
23+
24+
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).
2325

2426
### Initial Setup
2527

@@ -49,12 +51,16 @@ grunt serve
4951

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

54+
#### Testing
55+
56+
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.
57+
5258
#### Releasing
5359

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

5965
## License
6066

deploy.sh

+43-12
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,54 @@
11
#!/usr/bin/env bash
22
set -eo pipefail
3-
if ([ $TRAVIS_PULL_REQUEST == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ $TRAVIS_BRANCH == "dev" ] || [ $TRAVIS_BRANCH == "master" ]))
3+
4+
# Check for release branch - not using grep as set -e means it fails script
5+
RELEASE_BRANCH=$(echo "$TRAVIS_BRANCH" | sed -n 's/^release\-/&/p')
6+
7+
#Get the release type (dev/master) from the branch name
8+
TYPE="$TRAVIS_BRANCH"
9+
10+
if ([ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "${TRAVIS_REPO_SLUG}" == "ScottLogic/StockFlux" ] && ([ "$TYPE" == "dev" ] || [ "$TYPE" == "master" ] || [ -n "$RELEASE_BRANCH" ]))
411
then
512
#Clone the latest gh-pages
613
git clone https://github.com/ScottLogic/StockFlux.git --branch gh-pages gh-pages
714

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

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

16-
if ([ -z "$TYPE" ] || [ -z "$VERSION" ])
21+
if ([ $TYPE == "master" ] || [ $TYPE == "dev" ])
1722
then
18-
echo "Version or Type not set in package.json"
19-
exit 1
23+
echo "Preparing to build version $TYPE"
24+
grunt ci --build-target=$TYPE
25+
26+
rm -rf "./gh-pages/$TYPE"
27+
cp -r "./public" "./gh-pages/$TYPE"
28+
fi
29+
30+
if ([ $TYPE == "master" ] || [ -n "$RELEASE_BRANCH" ])
31+
then
32+
echo "On $TYPE - building versioned build"
33+
if ([ -z "$VERSION" ])
34+
then
35+
echo "Unable to determine version from package.json."
36+
exit 1
37+
fi
38+
if [ -n "$RELEASE_BRANCH" ]
39+
then
40+
#For release branches add rc postfix
41+
VERSION="$VERSION-rc"
42+
echo "Release branch - updating version to $VERSION"
43+
fi
44+
# Rebuild everything to do $VERSION
45+
echo "Cleaning build. Targetting $VERSION"
46+
grunt ci --build-target=$VERSION
47+
48+
rm -rf "./gh-pages/$VERSION"
49+
cp -r "./public" "./gh-pages/$VERSION"
2050
fi
2151

22-
rm -rf "./gh-pages/$TYPE"
23-
cp -r "./public" "./gh-pages/$TYPE"
24-
rm -rf "./gh-pages/$VERSION"
25-
cp -r "./public" "./gh-pages/$VERSION"
2652
cd gh-pages
2753

2854
#Removing git history
@@ -42,6 +68,11 @@ then
4268
# repo's gh-pages branch. (All previous history on the gh-pages branch
4369
# will be lost, since we are overwriting it.) We redirect any output to
4470
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
45-
echo "Pushing to: https://${GH_TOKEN}@${GH_REF}"
71+
echo "Pushing to Github..."
4672
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1
73+
74+
echo "Cleaning residual gh-pages folder"
75+
rm -rf ./gh-pages
76+
else
77+
echo "Nothing needs deploying"
4778
fi

docs/TEST_PLAN.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Test Plan
2+
## Assumptions/Luxuries
3+
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
4+
The assumption is that right click is disabled and in any instance should always produce no effect.
5+
Hover on means to move mouse cursor over an element.
6+
Hover off means to move mouse cursor off an element.
7+
8+
9+
## Task bar functionality
10+
| |Action |Favourites (FV) | Search (FV) | Favourites (CV) | Search (CV) |
11+
|--- |--- |--- | --- | --- | --- |
12+
| Close Button | Hover in | Close button is highlighted | "" | "" | "" |
13+
| | Hover out | Close button highlight removed | "" | "" | "" |
14+
| | Left click | Application Closes | "" | "" | "" |
15+
| Minimize Button | Hover in | Minimize button is highlighted | "" | "" | "" |
16+
| | Hover out | Minimize button highlight removed | "" | "" | "" |
17+
| | Left click | Application Minimizes | "" | "" | "" |
18+
| Maximize Button | Hover in | Maximize button is highlighted | "" | "" | "" |
19+
| | Hover out | Maximize button highlight removed | "" | "" | "" |
20+
| | Left click | Application maximizes | "" | "" | "" |
21+
| History Button (No history) | Observe | Button should not be present | "" | "" | "" |
22+
| History Button (unviewed history) | Observe | Button should be present highlighted | "" | "" | "" |
23+
| | Hover in | History button is highlighted | "" | "" | "" |
24+
| | Hover out | History button is highlighted | "" | "" | "" |
25+
| | Left Click | List of history is displayed to user, most recent first. | "" | "" | "" |
26+
| | Exiting history | Button should lose highlight. | "" | "" | "" |
27+
| History Button (viewed history) | Observe | Button should be present and not highlighted | "" | "" | "" |
28+
| | hover in | History button is highlighted | "" | "" | "" |
29+
| | hover out | History button highlight is removed | "" | "" | "" |
30+
| | Left Click | List of history is displayed to user, most recent first. | "" | "" | "" |
31+
| | Exiting history | Button remain unhighlighted. | "" | "" | "" |
32+
| Compact View Button | Hover in | CW button is highlighted | "" | N/A | "" |
33+
| | Hover out | CW button highlight removed | "" | N/A | "" |
34+
| | Left click | Changes view to CV | "" | N/A | "" |
35+
| Full View Button | Hover in | N/A | "" | FW button is highlighted | "" |
36+
| | Hover out | N/A | "" | FW button highlight is removed | "" |
37+
| | Left Click | N/A | "" | Changes view to FV | "" |
38+
39+
40+
### Favourites
41+
|Action |Favourites (FV) | Search (FV) | Favourites (CV) | Search (CV) |
42+
|---|---|---|---|---|
43+
| 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 |
44+
| 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 |
45+
| 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 |
46+
| 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 |
47+
| 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 |
48+
| 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|
49+
| Hover on a favourite stock | Should change the background colour of the hovered favourite to dark grey | "" | "" | "" |
50+
| Hover off a favourite stock | Should change the background colour of the hovered out favourite back to light grey | "" | "" | "" |
51+
| 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. | "" |
52+
| 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. | "" |
53+
| 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 | "" |
54+
| 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 |
55+
| 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 | "" |
56+
| 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 | "" |
57+
| 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 |
58+
| Position refreshed | New positions should be immediately visible | "" | "" | "" |
59+
| Maintain position | New positions should be retained if window is closed and reopened | "" | "" | "" |
60+
| 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 | "" |
61+
| 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 | "" |
62+
| 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 | "" |
63+
| Drag the last favourite out and drop else where on desktop | Window should move to drop location | "" | Window should move to drop location | "" |
64+
| 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 | "" |
65+
66+
### Transition between Favourites FV and Search FV
67+
| Element | Action |Result |
68+
|---|---|---|
69+
| Search Tab | From the favourites FV, left click the search tab | favourites tab should hide and search tab become visible. |
70+
| Favourites Tab | From the Search FV, left click favourites tab | Search tab should hide and favourites become visible|
71+
72+
### Searching
73+
| Action |Result |
74+
|---|---|---|
75+
| View empty search field | Should contain text "Enter stock name or symbol" |
76+
| 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|
77+
| 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. |
78+
| Entering "complicated" into search field | No search results should be found. The search results box should display "Oops! looks like no matches were found."|
79+
| 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.|
80+
| 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)|

0 commit comments

Comments
 (0)