-
Notifications
You must be signed in to change notification settings - Fork 34
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
new demo site with integrated capture and graph/download, plus Cypress tests #175
Changes from all commits
f0635b3
2d26192
de91150
5d6a262
5bed37f
de41dcd
baef78d
8cac73d
8c13593
fcd418b
40e1dad
a9d242e
8df8400
1c8614e
95372fb
5a25826
d66001e
23ebbb0
8454141
9bd7fc1
1e80c87
2674b75
755f33e
3f90256
5273dd7
2c30de8
ef09ffb
3fe47c9
c38e339
77ba1f8
b05ab44
02c1adc
8f87228
12f58d2
1260187
77354ba
18e2a39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
language: node_js | ||
node_js: | ||
- '8' | ||
before_script: grunt build | ||
script: grunt jasmine | ||
before_install: | ||
- npm install -g grunt-cli bower | ||
- bower install | ||
- '12' | ||
cache: | ||
# Caches $HOME/.npm when npm ci is default script command | ||
# Caches node_modules in all other cases | ||
npm: true | ||
directories: | ||
# we also need to cache folder with Cypress binary | ||
- ~/.cache | ||
install: | ||
- npm ci | ||
before_script: | ||
- grunt build | ||
- node_modules/http-server/bin/http-server & | ||
script: | ||
- $(npm bin)/cypress run --record | ||
- grunt jasmine | ||
env: | ||
- CXX=g++-4.8 | ||
- CXX=g++-4.8 | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.8 | ||
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves | ||
- libgconf-2-4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,10 +64,10 @@ module.exports = function(grunt) { | |
specs: 'spec/javascripts/*spec.js', | ||
vendor: [ | ||
'node_modules/jquery/dist/jquery.min.js', | ||
'bower_components/d3/d3.js', | ||
'bower_components/nvd3/build/nv.d3.js', | ||
'bower_components/bootstrap-css/js/bootstrap.min.js', | ||
'bower_components/moment/moment.js', | ||
'node_modules/d3/d3.js', | ||
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. Could something be wrong with this line, for jasmine? 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. ah yes! I think d3 would be in a 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. Hmm. |
||
'node_modules/nvd3/build/nv.d3.js', | ||
'node_modules/bootstrap/dist/js/bootstrap.min.js', | ||
'node_modules/moment/moment.js', | ||
'node_modules/jasmine-jquery/lib/jasmine-jquery.js', | ||
'node_modules/jasmine-ajax/lib/mock-ajax.js', | ||
'spec/javascripts/helpers/test_responses.js' | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"projectId": "128076ed-9868-4e98-9cef-98dd8b705d75" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/// <reference types="cypress" /> | ||
|
||
context('Actions', () => { | ||
|
||
beforeEach(() => { | ||
cy.visit('http://127.0.0.1:8080/examples/new-capture/') | ||
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. Let's change this! |
||
}) | ||
|
||
|
||
it('It reach the default landing page', () => { | ||
cy.get('#landing-page-content').contains('Spectral WorkBench'); | ||
cy.get('#landing-page-content').contains('What is Spectral Workbench?'); | ||
}) | ||
|
||
it('The header navigation stepper is present and it is in the correct order', () => { | ||
cy.get('.bs-stepper-header') | ||
cy.get('.bs-stepper-header>div').eq(0).contains('Home Page') | ||
cy.get('.bs-stepper-header>div').eq(2).contains('Settings') | ||
cy.get('.bs-stepper-header>div').eq(4).contains('Capture') | ||
cy.get('.bs-stepper-header>div').eq(6).contains('Plotting') | ||
}); | ||
|
||
it('The default Home page step should be highlighted but not the rest', () => { | ||
cy.get('.bs-stepper-header') | ||
cy.get('.bs-stepper-header>div').eq(0).should('have.class', 'active') | ||
cy.get('.bs-stepper-header>div').eq(2).not('have.class', 'active') | ||
cy.get('.bs-stepper-header>div').eq(4).not('have.class', 'active') | ||
cy.get('.bs-stepper-header>div').eq(6).not('have.class', 'active') | ||
}); | ||
|
||
|
||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************************** | ||
// This example plugins/index.js can be used to load plugins | ||
// | ||
// You can change the location of this file or turn off loading | ||
// the plugins file with the 'pluginsFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/plugins-guide | ||
// *********************************************************** | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
|
||
/** | ||
* @type {Cypress.PluginConfig} | ||
*/ | ||
module.exports = (on, config) => { | ||
// `on` is used to hook into various events Cypress emits | ||
// `config` is the resolved Cypress config | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add("login", (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/index.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
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.
And another example here: https://github.com/cypress-io/cypress-example-kitchensink/blob/master/.travis.yml