-
Notifications
You must be signed in to change notification settings - Fork 183
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
adds whole project transfered from old repo #162
Open
gimi-q
wants to merge
3
commits into
makersacademy:master
Choose a base branch
from
gimi-q:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bower_components | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "todo_list_week8_challenge_ma", | ||
"description": "", | ||
"main": "", | ||
"moduleType": [], | ||
"license": "MIT", | ||
"homepage": "", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"jquery": "^2.2.0", | ||
"bootstrap": "^3.3.6", | ||
"angular": "^1.4.9", | ||
"angular-resource": "^1.4.9" | ||
}, | ||
"devDependencies": { | ||
"angular-mocks": "^1.4.9", | ||
"angular-route": "^1.4.9" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!doctype html> | ||
<html lang="en" ng-app="toDoList"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>To Do List</title> | ||
<link href="bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet"> | ||
<script src="bower_components/jquery/dist/jquery.js"></script> | ||
<script src="bower_components/angular/angular.js"></script> | ||
<script src="bower_components/angular-resource/angular-resource.js"></script> | ||
<script src="js/app.js"></script> | ||
<script src="js/toDoListController.js"></script> | ||
</head> | ||
|
||
<body ng-controller="toDoListController as toDoListCtrl"> | ||
<h1>What Needs To Be Done?</h1> | ||
<section> | ||
|
||
<form> | ||
<label for="newToDo">New ToDo:</label> | ||
<input class="form-control" id="newToDo" ng-model="toDoListCtrl.addTask" type="text"> | ||
<input class="btn btn-primary submit" id="newTask" ng-click="toDoListCtrl.newTask()" type="submit" value="submit"> | ||
</form> | ||
</section> | ||
<ul class="list-group"> | ||
<li ng-repeat="task in toDoListCtrl.tasks"> | ||
|
||
<p> | ||
<span><input type="checkbox" value=""></span>{{task}} | ||
<span class="pull-right"> | ||
<button class="btn btn-xs btn-info" ng-click="this.value='Complete'">Active</button> | ||
<button class="btn btn-xs btn-info">Edit</button> | ||
<button class="btn btn-xs btn-warning" ng-click="toDoListCtrl.remove(item)"> | ||
<span class="glyphicon glyphicon-trash"></span> | ||
</button> | ||
</span> | ||
</p> | ||
</li> | ||
</ul> | ||
<div></div> | ||
<div class="btn-group"> | ||
<button class="btn btn-primary" type="button">All</button> | ||
<button class="btn btn-primary" type="button">Active</button> | ||
<button class="btn btn-primary" type="button">Complete</button> | ||
<button class="btn btn-primary" type="button">Clear All</button> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var toDoList = angular.module('toDoList', ['ngResource']); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
toDoList.controller('toDoListController', [function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'toDoList' is not defined. |
||
|
||
var self = this; | ||
|
||
self.tasks = [ | ||
|
||
] | ||
|
||
self.newTask = function() { | ||
self.tasks.push(self.addTask); | ||
}; | ||
|
||
self.remove = function(item) { | ||
var index = self.tasks.indexOf(item); | ||
self.tasks.splice(index, 1); | ||
} | ||
|
||
|
||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "todo_challenge", | ||
"version": "1.0.0", | ||
"description": "* Deadline: submit completed pull request by 9am on Monday * You may use whatever level of JavaScript you feel comfortable with - pure JS, jQuery, Angular, or whatever weird and wonderful framework you want to try. Extra points for DogeScript", | ||
"main": "index.js", | ||
"directories": { | ||
"doc": "docs" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/gimi-q/todo_challenge.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/gimi-q/todo_challenge/issues" | ||
}, | ||
"homepage": "https://github.com/gimi-q/todo_challenge#readme", | ||
"devDependencies": { | ||
"protractor": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
exports.config = { | ||
seleniumAddress: 'http://localhost:4444/wd/hub', | ||
baseUrl: 'http://localhost:8081', | ||
specs: ['toDoListFeature.js'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('To Do List', function() { | ||
it('has a title', function() { | ||
browser.get('http://localhost:8081'); | ||
|
||
expect(browser.getTitle()).toEqual('To Do List'); | ||
}); | ||
|
||
it('add tasks', function() { | ||
|
||
element(by.model('toDoListCtrl.addTask')).sendKeys('Walk Cat'); | ||
element(by.id('newTask')).click(); | ||
|
||
expect(element(by.binding('task')).getText()). | ||
toContain('Walk Cat'); | ||
}); | ||
|
||
xit('can delete tasks', function() { | ||
|
||
element(by.model('toDoListCtrl.addTask')).sendKeys('Walk Cat'); | ||
element(by.id('newTask')).click(); | ||
element(by.id('deleteTask')).click(); | ||
|
||
expect(element(by.binding('task')).getText()). | ||
toContain('Walk Cat'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Karma configuration | ||
// Generated on Thu Nov 27 2014 10:43:21 GMT+0000 (GMT) | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
|
||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '../', | ||
|
||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['jasmine'], | ||
|
||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
'bower_components/angular/angular.js', | ||
'bower_components/angular-route/angular-route.js', | ||
'bower_components/angular-resource/angular-resource.js', | ||
'bower_components/angular-mocks/angular-mocks.js', | ||
'js/**/*.js', | ||
'test/**/*.spec.js' | ||
], | ||
|
||
|
||
// list of files to exclude | ||
exclude: [], | ||
|
||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: {}, | ||
|
||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['progress'], | ||
|
||
|
||
// web server port | ||
port: 9876, | ||
|
||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['PhantomJS'], | ||
|
||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
describe('toDoListController', function() { | ||
beforeEach(module('toDoList')); | ||
|
||
var ctrl; | ||
|
||
beforeEach(inject(function($controller) { | ||
ctrl = $controller('toDoListController'); | ||
})); | ||
|
||
it('initialises with an empty to do input field', function() { | ||
expect(ctrl.toDoListInput).toBeUndefined(); | ||
|
||
}); | ||
|
||
describe('when adding a to do task', function() { | ||
|
||
var tasks = | ||
{ | ||
"task": "Walk Dog" | ||
|
||
} | ||
|
||
|
||
|
||
it('displays the new to do task', function() { | ||
ctrl.addTask = 'Walk Dog' | ||
ctrl.newTask(); | ||
expect(ctrl.tasks).toEqual(tasks); | ||
}); | ||
}); | ||
|
||
|
||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'angular' is not defined.