nginxconfig.io/cypress/integration/nginxconfig_spec.js

26 lines
729 B
JavaScript
Raw Normal View History

2018-07-01 13:28:35 +00:00
const path = require('path');
const root = 'http://localhost:8080';
2018-07-01 13:28:35 +00:00
describe('nginxconfig.io', function () {
beforeEach(function () {
2018-07-01 13:28:35 +00:00
cy.visit(root);
});
it('<title> is correct', function () {
2018-07-01 13:28:35 +00:00
cy.title().should('include', 'nginxconfig.io');
});
it('should use passed params', function () {
2019-01-06 15:12:45 +00:00
cy.visit(root + '?0.domain=nginxconfig.io');
cy.get('input.domain').should('have.value', 'nginxconfig.io');
2019-01-06 15:18:16 +00:00
cy.get('#file-domain-0').contains('server_name nginxconfig.io;');
2019-01-06 15:12:45 +00:00
});
it('should use legacy passed params', function () {
2018-07-01 13:28:35 +00:00
cy.visit(root + '?domain=nginxconfig.io');
cy.get('input.domain').should('have.value', 'nginxconfig.io');
2019-01-06 15:18:16 +00:00
cy.get('#file-domain-0').contains('server_name nginxconfig.io;');
2018-07-01 13:28:35 +00:00
});
});