diff --git a/.env.travis b/.env.travis index 040f122..7c81f1d 100644 --- a/.env.travis +++ b/.env.travis @@ -1,5 +1,6 @@ APP_ENV=testing APP_KEY=SomeRandomString +APP_KEY= ADMIN_ENABLED=true ALLOW_UNSORTED_CATEGORY=true @@ -11,3 +12,5 @@ DB_TEST_PASSWORD= CACHE_DRIVER=array SESSION_DRIVER=array QUEUE_DRIVER=sync +LOCALE=en +LOCALE_FALLBACK=en diff --git a/.gitignore b/.gitignore index fd59e43..e7397c6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ *.iml /public/js/*.js /public/css/* -/public/views/*.html \ No newline at end of file +/public/views/*.html +/tests/screenshots diff --git a/.travis.yml b/.travis.yml index 7fec2d9..f4444a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ env: - NODE_RELEASE=4.x before_install: + # - wget "https://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar" - sudo rm -rf ~/.nvm - curl -sL "https://deb.nodesource.com/setup_${NODE_RELEASE}" | sudo -E bash - - sudo apt-get install -y nodejs @@ -15,6 +16,8 @@ before_install: install: - npm install + # - java -jar selenium-server-standalone-2.48.2.jar & +# - java -jar selenium-server-standalone-2.48.2.jar > /dev/null 2>&1 & - gulp --production - cp .env.travis .env - mysql -e 'create database homestead_test;' @@ -23,7 +26,10 @@ install: - php artisan key:generate - php artisan migrate --seed - php artisan db:seed --class=DummyBookmarksSeeder -# - php -S localhost:8000 -t public/ + - php -S localhost:8000 -t public/ & +# - php -S localhost:8000 -t public/ > /dev/null 2>&1 & + - sleep 5 script: - vendor/bin/phpunit + - npm test diff --git a/README.md b/README.md index 49fd46a..7707f63 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Easy (and fast) self-hosted bookmark manager. ### Demo -You can test easey-bookmark-manager here : [demo](http://bookmarkdemo.miceli.click/) +You can test easy-bookmark-manager here : [demo](http://bookmarkdemo.miceli.click/) -Login are **admin** as login and **nimda** as password. +Use **admin** as login and **nimda** as password. You can also download easy-bookmark-manager [chrome plugin](https://chrome.google.com/webstore/detail/easy-bookmark-manager-ext/hhonlfdhoejpaofmmppaogebkfnbgefi) @@ -78,7 +78,7 @@ $ gulp && gulp watch ### Chrome Extension -[Easy Bookmark Manager Extension](https://chrome.google.com/webstore/detail/easy-bookmark-manager-ext/hhonlfdhoejpaofmmppaogebkfnbgefi) +Install [Easy Bookmark Manager Extension](https://chrome.google.com/webstore/detail/easy-bookmark-manager-ext/hhonlfdhoejpaofmmppaogebkfnbgefi) [Source](https://github.com/devimust/easy-bookmark-manager-chrome-extension) diff --git a/elixir-extensions.js b/elixir-extensions.js index 2ea8f1f..e4c4e7b 100644 --- a/elixir-extensions.js +++ b/elixir-extensions.js @@ -7,21 +7,16 @@ var jshint = require('gulp-jshint'); var Task = Elixir.Task; Elixir.extend('remove', function(path) { - new Task('remove', function() { del(path); return gulp.src(''); }); - }); - Elixir.extend('jshint', function(path) { - new Task('jshint', function() { return gulp.src(path) .pipe(jshint()) .pipe(jshint.reporter('default')); }); - }); diff --git a/gulpfile.js b/gulpfile.js index c3c44aa..ae4c40c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,8 @@ +var gulp = require('gulp'); +var testcafe = require('gulp-testcafe'); var elixir = require('laravel-elixir'); -require('./elixir-extensions') +require('./elixir-extensions'); /* |-------------------------------------------------------------------------- @@ -42,7 +44,7 @@ elixir(function(mix) { // vendor scripts mix - .scripts([ + .combine([ 'node_modules/jquery/dist/jquery.min.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'node_modules/angular/angular.min.js', @@ -77,3 +79,18 @@ elixir(function(mix) { ]); }); + + +/* + |-------------------------------------------------------------------------- + | e2e Automated Testing + |-------------------------------------------------------------------------- + | + | An e2e test suite covering most key functionality across the website. + | + */ + +gulp.task('test', function() { + return gulp.src('./tests/e2e/auth.test.js') + .pipe(testcafe({ browsers: ['phantomjs'] })); +}); diff --git a/package.json b/package.json index 8adbbfc..b87a2ef 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,14 @@ { "private": true, "devDependencies": { + "chai": "^3.5.0", "del": "^2.2.0", "gulp": "^3.8.8", "gulp-jshint": "^2.0.0", "gulp-shell": "^0.5.2", - "jshint": "^2.9.1" + "gulp-testcafe": "^0.9.0", + "jshint": "^2.9.1", + "testcafe-browser-provider-phantomjs": "^1.0.0" }, "dependencies": { "ace-editor-builds": "^1.2.0", @@ -18,5 +21,8 @@ "laravel-elixir": "^4.0.0", "normalize.css": "^3.0.3", "select2": "^4.0.2-rc.1" + }, + "scripts": { + "test": "gulp test" } } diff --git a/resources/assets/views/bookmark-view.html b/resources/assets/views/bookmark-view.html index a49db9a..98901c7 100644 --- a/resources/assets/views/bookmark-view.html +++ b/resources/assets/views/bookmark-view.html @@ -13,7 +13,7 @@
-
+
{{ 'bookmark.categories' | translate }}
@@ -27,7 +27,7 @@ {{category.count}} -
  • -
    +
    {{'bookmark.tags' | translate }}
    @@ -89,7 +89,7 @@
    -
    +