BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e77b72bd
Commit
e77b72bd
authored
Feb 08, 2017
by
Filipa Lacerda
Committed by
Ruben Davila
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'backport-ee-build-fixes' into 'master'
Backport fixes for pipelines_store frontend specs Closes #27871 See merge request !9067
parent
1659c79c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
pipelines_store.js.es6
...ssets/javascripts/commit/pipelines/pipelines_store.js.es6
+1
-1
index.js.es6
app/assets/javascripts/vue_realtime_listener/index.js.es6
+11
-0
pipelines_store_spec.js.es6
.../javascripts/commit/pipelines/pipelines_store_spec.js.es6
+3
-0
No files found.
app/assets/javascripts/commit/pipelines/pipelines_store.js.es6
View file @
e77b72bd
...
...
@@ -26,7 +26,7 @@ class PipelinesStore {
*/
startTimeAgoLoops() {
const startTimeLoops = () => {
this.timeLoopInterval = setInterval(
function timeloopInterval()
{
this.timeLoopInterval = setInterval(
() =>
{
this.$children[0].$children.reduce((acc, component) => {
const timeAgoComponent = component.$children.filter(el => el.$options._componentTag === 'time-ago')[0];
acc.push(timeAgoComponent);
...
...
app/assets/javascripts/vue_realtime_listener/index.js.es6
View file @
e77b72bd
...
...
@@ -14,5 +14,16 @@
window.addEventListener('focus', startIntervals);
window.addEventListener('blur', removeIntervals);
document.addEventListener('beforeunload', removeAll);
// add removeAll methods to stack
const stack = gl.VueRealtimeListener.reset;
gl.VueRealtimeListener.reset = () => {
gl.VueRealtimeListener.reset = stack;
removeAll();
stack();
};
};
// remove all event listeners and intervals
gl.VueRealtimeListener.reset = () => undefined; // noop
})(window.gl || (window.gl = {}));
spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6
View file @
e77b72bd
...
...
@@ -7,6 +7,9 @@ describe('Store', () => {
store = new gl.commits.pipelines.PipelinesStore();
});
// unregister intervals and event handlers
afterEach(() => gl.VueRealtimeListener.reset());
it('should start with a blank state', () => {
expect(store.state.pipelines.length).toBe(0);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment