forked from heckenmann/docker-swarm-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request heckenmann#462 from heckenmann/feature/some-things
Feature/some things
- Loading branch information
Showing
15 changed files
with
220 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
const { defineConfig } = require("cypress"); | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
baseUrl: 'http://localhost:3000', | ||
viewportWidth: 1920, | ||
viewportHeight: 1080, | ||
}, | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('About Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'About').click() | ||
cy.document().its('body').should('contain', 'Docker Swarm Dashboard') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Dashboard horizontal Tests', () => { | ||
it('Dashboard horizontal', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Dashboard').click() | ||
cy.contains('button', 'manager1').click() | ||
cy.contains('button', 'JSON') | ||
|
||
cy.contains('a', 'Dashboard').click() | ||
cy.contains('button', 'manager2').click() | ||
cy.contains('button', 'JSON') | ||
|
||
cy.contains('a', 'Dashboard').click() | ||
cy.contains('button', 'manager3').click() | ||
cy.contains('button', 'JSON') | ||
|
||
cy.contains('a', 'Dashboard').click() | ||
cy.contains('div', 'dsd_docker-swarm-dashboard').click() | ||
cy.contains('button', 'JSON') | ||
cy.contains('button', 'Table') | ||
}) | ||
}) | ||
|
||
it('Filter by service name', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Dashboard').click() | ||
cy.contains('th > div', 'dsd_docker-swarm-dashboard') | ||
cy.contains('th > div', 'logger') | ||
cy.get('input[placeholder="Filter services by service name"]').type('dsd') | ||
cy.contains('th > div', 'logger').should('not.exist') | ||
cy.get('input[placeholder="Filter services by service name"]') | ||
.clear() | ||
.type('logger') | ||
cy.contains('th > div', 'logger') | ||
cy.contains('th > div', 'dsd_docker-swarm-dashboard').should('not.exist') | ||
cy.get('input[placeholder="Filter services by service name"]').clear() | ||
}) | ||
}) | ||
|
||
it('Filter by stack name', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Dashboard').click() | ||
cy.contains('th > div', 'dsd_docker-swarm-dashboard') | ||
cy.contains('th > div', 'logger') | ||
cy.contains('select', 'Service').select('Stack') | ||
cy.get('input[placeholder="Filter services by stack name"]').type('dsd') | ||
cy.contains('th > div', 'logger').should('not.exist') | ||
cy.get('input[placeholder="Filter services by stack name"]') | ||
.clear() | ||
.type('logger') | ||
cy.contains('th > div', 'logger').should('not.exist') | ||
cy.contains('th > div', 'dsd_docker-swarm-dashboard').should('not.exist') | ||
cy.get('input[placeholder="Filter services by stack name"]').clear() | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Dashboard vertical Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Dashboard').click() | ||
cy.get('main button:eq(1)').click() | ||
cy.contains('td', 'dsd_docker-swarm-dashboard').click() | ||
cy.contains('a', 'Dashboard').click() | ||
cy.get('main button:eq(1)').click() | ||
cy.contains('th', 'manager1').click() | ||
}) | ||
}) | ||
|
||
it('Filter by service name', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Dashboard').click() | ||
cy.get('main button:eq(1)').click() | ||
cy.contains('td', 'dsd_docker-swarm-dashboard') | ||
cy.contains('td', 'logger') | ||
cy.get('input[placeholder="Filter services by service name"]').type('dsd') | ||
cy.contains('th > div', 'logger').should('not.exist') | ||
cy.get('input[placeholder="Filter services by service name"]') | ||
.clear() | ||
.type('logger') | ||
cy.contains('td', 'logger') | ||
cy.contains('td', 'dsd_docker-swarm-dashboard').should('not.exist') | ||
cy.get('input[placeholder="Filter services by service name"]').clear() | ||
}) | ||
}) | ||
|
||
it('Filter by stack name', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Dashboard').click() | ||
cy.get('main button:eq(1)').click() | ||
cy.contains('td', 'dsd_docker-swarm-dashboard') | ||
cy.contains('td', 'logger') | ||
cy.contains('select', 'Service').select('Stack') | ||
cy.get('input[placeholder="Filter services by stack name"]').type('dsd') | ||
cy.contains('td', 'logger').should('not.exist') | ||
cy.get('input[placeholder="Filter services by stack name"]') | ||
.clear() | ||
.type('logger') | ||
cy.contains('td', 'logger').should('not.exist') | ||
cy.contains('td', 'dsd_docker-swarm-dashboard').should('not.exist') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Nodes Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Nodes').click() | ||
cy.contains('td', 'manager1').click() | ||
cy.contains('a', 'Nodes').click() | ||
cy.contains('td', 'manager2').click() | ||
cy.contains('a', 'Nodes').click() | ||
cy.contains('td', 'manager3').click() | ||
cy.contains('a', 'Nodes').click() | ||
cy.contains('td', 'worker1').click() | ||
cy.contains('a', 'Nodes').click() | ||
cy.contains('td', 'worker2').click() | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Ports Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Ports').click() | ||
cy.contains('td', '8080') | ||
cy.contains('td', 'dsd_docker-swarm-dashboard') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Settings Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Settings').click() | ||
cy.get('input:eq(1)').click() | ||
cy.get('input:eq(2)').click() | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Stacks Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Stacks').click() | ||
cy.contains('td', 'docker-swarm-dashboard') | ||
cy.contains('h5', 'dsd').click() | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Tasks Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Tasks').click() | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { visitBaseUrlAndTest } from './spec.cy' | ||
|
||
describe('Timeline Tests', () => { | ||
it('Load page', () => { | ||
visitBaseUrlAndTest(() => { | ||
cy.contains('a', 'Timeline').click() | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.