cypress updates

This commit is contained in:
Szekeres Bálint 2018-07-01 15:28:35 +02:00
parent ed8a2f5a1d
commit c43ec344fd
3 changed files with 2956 additions and 3514 deletions

View File

@ -1,21 +1,19 @@
const path = require('path') const path = require('path');
const root = 'http://localhost:8080' const root = 'http://localhost:8080';
describe('nginx.config.io', function () { describe('nginxconfig.io', function () {
beforeEach(function () { beforeEach(function () {
cy.visit(root) cy.visit(root);
}) });
it('<title> is correct', function () { it('<title> is correct', function () {
// https://on.cypress.io/visit cy.title().should('include', 'nginxconfig.io');
cy.title().should('include', 'nginxconfig.io') });
})
it('should use passed params', function () { it('should use passed params', function () {
cy.visit(root + '?domain=mydomain.fr') cy.visit(root + '?domain=nginxconfig.io');
cy.get('input.domain').should('have.value', 'mydomain.fr') cy.get('input.domain').should('have.value', 'nginxconfig.io');
cy.get('#file-nginx').contains('server_name mydomain.fr;') cy.get('#file-nginx').contains('server_name nginxconfig.io;');
}) });
});
})

6431
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,14 +25,17 @@
"node-sass": "^4.9.0" "node-sass": "^4.9.0"
}, },
"devDependencies": { "devDependencies": {
"cypress": "^2.1.0", "cypress": "^3.0.2",
"forever": "^0.15.3", "http-server": "^0.11.1",
"http-server": "^0.11.1" "start-server-and-test": "^1.5.0"
}, },
"scripts": { "scripts": {
"start": "http-server",
"build": "node-sass --source-map=public/assets/css/app.min.css.map resources/scss/app.scss public/assets/css/app.min.css", "build": "node-sass --source-map=public/assets/css/app.min.css.map resources/scss/app.scss public/assets/css/app.min.css",
"build:prod": "node-sass --output-style=compressed resources/scss/app.scss public/assets/css/app.min.css", "build:prod": "node-sass --output-style=compressed resources/scss/app.scss public/assets/css/app.min.css",
"dev": "forever start ./node_modules/.bin/http-server && cypress open && forever stop ./node_modules/.bin/http-server", "test": "start-server-and-test start http://localhost:8080 cypress:run",
"test": "forever start ./node_modules/.bin/http-server && cypress run --record && forever stop ./node_modules/.bin/http-server" "test:debug": "start-server-and-test start http://localhost:8080 cypress:open",
"cypress:run": "cypress run",
"cypress:open": "cypress open"
} }
} }