Skip to content

Commit

Permalink
[5] Add starter cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHeist committed Jun 24, 2024
1 parent 23c9871 commit 7f4fd52
Show file tree
Hide file tree
Showing 7 changed files with 2,088 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:4242',
},
});
61 changes: 61 additions & 0 deletions cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
describe('Visit All Pages', () => {
it('Visits the home page', () => {
cy.visit('/')
cy.url().should('eq', Cypress.config('baseUrl') + '/')
});

it('Visits the add Series page', () => {
cy.visit('/add')
cy.url().should('eq', Cypress.config('baseUrl') + '/add')
});

it('Visits the missing page', () => {
cy.visit('/missing')
cy.url().should('eq', Cypress.config('baseUrl') + '/missing')
});

it('Visits the Templates page', () => {
cy.visit('/card-templates')
cy.url().should('eq', Cypress.config('baseUrl') + '/card-templates')
});

it('Visits the Fonts page', () => {
cy.visit('/fonts')
cy.url().should('eq', Cypress.config('baseUrl') + '/fonts')
});

it('Visits the Sync page', () => {
cy.visit('/sync')
cy.url().should('eq', Cypress.config('baseUrl') + '/sync')
});

it('Visits the Settings page', () => {
cy.visit('/settings')
cy.url().should('eq', Cypress.config('baseUrl') + '/settings')
});

it('Visits the Connections page', () => {
cy.visit('/connections')
cy.url().should('eq', Cypress.config('baseUrl') + '/connections')
});

it('Visits the Scheduler page', () => {
cy.visit('/scheduler')
cy.url().should('eq', Cypress.config('baseUrl') + '/scheduler')
});

it('Visits the Importer page', () => {
cy.visit('/import')
cy.url().should('eq', Cypress.config('baseUrl') + '/import')
});

it('Visits the Logs page', () => {
cy.visit('/logs')
cy.url().should('eq', Cypress.config('baseUrl') + '/logs')
});

it('Visits a missing page', () => {
cy.visit('/non-existent')
cy.url().should('eq', Cypress.config('baseUrl') + '/')
});
});
25 changes: 25 additions & 0 deletions cypress/support/commands.js
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) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.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')
2 changes: 1 addition & 1 deletion modules/ref/version_webui
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0-alpha.10.1-webui4
v2.0-alpha.10.1-webui5
Loading

0 comments on commit 7f4fd52

Please sign in to comment.