mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-09 01:25:40 +08:00
Added Integration testing (#13)
* Added cypress testing * Added recording * cleaned npm scrips
This commit is contained in:
committed by
Bálint Szekeres
parent
6ff1b0eb71
commit
b72673ffe7
21
cypress/integration/nginxconfig_spec.js
Normal file
21
cypress/integration/nginxconfig_spec.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const path = require('path')
|
||||
const root = 'http://localhost:8080'
|
||||
|
||||
describe('nginx.config.io', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
cy.visit(root)
|
||||
})
|
||||
|
||||
it('<title> is correct', function () {
|
||||
// https://on.cypress.io/visit
|
||||
cy.title().should('include', 'nginxconfig.io')
|
||||
})
|
||||
|
||||
it('should use passed params', function () {
|
||||
cy.visit(root + '?domain=mydomain.fr')
|
||||
cy.get('input.domain').should('have.value', 'mydomain.fr')
|
||||
cy.get('#file-nginx').contains('server_name mydomain.fr;')
|
||||
})
|
||||
|
||||
})
|
Reference in New Issue
Block a user