-
Notifications
You must be signed in to change notification settings - Fork 82
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 #399 from Mehradml/master
Resolving issues and adding cypress to ci and writing new tests
- Loading branch information
Showing
21 changed files
with
330 additions
and
32 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,4 +1,7 @@ | ||
{ | ||
"viewportWidth": 1080, | ||
"viewportHeight": 920 | ||
} | ||
"viewportWidth": 1080, | ||
"viewportHeight": 920, | ||
"video": false, | ||
"testFiles": "**/theme/theme.spec.js", | ||
"ignoreTestFiles": ["**/*.test.js"] | ||
} |
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,27 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing BITMAP8 type validation', () => { | ||
it('create a new endpoint and click on configure to open attributes of endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.gotoAttributePage('Billing Unit (0x0203)', 'General') | ||
cy.wait(1000) | ||
}) | ||
it('getting an attribute with BITMAP8 type and change defualt amount', () => { | ||
cy.get( | ||
':nth-child(16) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('test', { force: true }) | ||
}) | ||
it('check if validation works properly', () => { | ||
cy.get( | ||
':nth-child(16) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__bottom > .q-field__messages > div' | ||
).should('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,27 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing BOOLEAN type validation', () => { | ||
it('create a new endpoint and click on configure to open attributes of endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.gotoAttributePage('Billing Unit (0x0203)', 'General') | ||
cy.wait(1000) | ||
}) | ||
it('getting an attribute with BOOLEAN type and change defualt amount', () => { | ||
cy.get( | ||
':nth-child(15) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('test', { force: true }) | ||
}) | ||
it('check if validation works properly', () => { | ||
cy.get( | ||
':nth-child(15) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__bottom > .q-field__messages > div' | ||
).should('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,27 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing ENUM8 type validation', () => { | ||
it('create a new endpoint and click on configure to open attributes of endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.gotoAttributePage('Billing Unit (0x0203)', 'General') | ||
cy.wait(1000) | ||
}) | ||
it('getting an attribute with ENUM8 type and change defualt amount', () => { | ||
cy.get( | ||
':nth-child(8) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('test', { force: true }) | ||
}) | ||
it('check if validation works properly', () => { | ||
cy.get( | ||
':nth-child(8) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__bottom > .q-field__messages > div' | ||
).should('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,27 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing INT16U type validation', () => { | ||
it('create a new endpoint and click on configure to open attributes of endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.gotoAttributePage('Billing Unit (0x0203)', 'General') | ||
cy.wait(1000) | ||
}) | ||
it('getting an attribute with INT16U type and change defualt amount', () => { | ||
cy.get( | ||
':nth-child(19) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('test', { force: true }) | ||
}) | ||
it('check if validation works properly', () => { | ||
cy.get( | ||
':nth-child(19) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__bottom > .q-field__messages > div' | ||
).should('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,27 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing INT8U type validation', () => { | ||
it('create a new endpoint and click on configure to open attributes of endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.gotoAttributePage('Billing Unit (0x0203)', 'General') | ||
cy.wait(1000) | ||
}) | ||
it('getting an attribute with INT8U type and change defualt amount', () => { | ||
cy.get( | ||
':nth-child(1) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('test', { force: true }) | ||
}) | ||
it('check if validation works properly', () => { | ||
cy.get( | ||
':nth-child(1) > [style="min-width: 180px;"] > .q-field > .q-field__inner > .q-field__bottom > .q-field__messages > div' | ||
).should('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,32 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing attribute search', () => { | ||
it('create a new endpoint and click on configure to open attributes of endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.gotoAttributePage('Billing Unit (0x0203)', 'General') | ||
cy.wait(1000) | ||
}) | ||
it('check existance of ZCL version and application version', () => { | ||
cy.get('tbody') | ||
.children() | ||
.should('contain', 'ZCL version') | ||
.and('contain', 'application version') | ||
}) | ||
it('Search for application', () => { | ||
cy.get( | ||
'.q-py-none > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('application', { force: true }) | ||
}) | ||
it('check if search result is correct', () => { | ||
cy.get('tbody').children().contains('ZCL version').should('not.exist') | ||
cy.get('tbody').children().should('contain', 'application version') | ||
}) | ||
}) |
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
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,42 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing cluster filters', () => { | ||
it('create a new endpoint', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.addEndpoint('Billing Unit (0x0203)', 'General') | ||
}) | ||
it('filter enabled clusters and check clusters', () => { | ||
cy.get( | ||
'.bar > :nth-child(1) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control' | ||
).click({ force: true }) | ||
cy.get('#qvs_3 > :nth-child(3)').click() | ||
cy.get('tbody') | ||
.children() | ||
.contains('Power Configuration') | ||
.should('not.exist') | ||
}) | ||
it('enable power configuration cluster and check if it exists this time', () => { | ||
cy.get( | ||
'.bar > :nth-child(1) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control' | ||
).click({ force: true }) | ||
cy.get('#qvs_3 > :nth-child(1)').click() | ||
cy.get('tbody').children().should('contain', 'Power Configuration') | ||
cy.get( | ||
'#General > .q-expansion-item__container > .q-expansion-item__content > :nth-child(1) > .q-table__container > .q-table__middle > .q-table > tbody > :nth-child(2) > :nth-child(6) > .q-field > .q-field__inner > .q-field__control' | ||
).click() | ||
cy.get('.q-virtual-scroll__content > :nth-child(3)') | ||
.contains('Server') | ||
.click() | ||
cy.get( | ||
'.bar > :nth-child(1) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control' | ||
).click({ force: true }) | ||
cy.get('#qvs_3 > :nth-child(3)').click() | ||
cy.get('tbody').children().should('contain', 'Power Configuration') | ||
}) | ||
}) |
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,30 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
// returning false here prevents Cypress from | ||
// failing the test | ||
return false | ||
}) | ||
|
||
describe('Testing cluster search', () => { | ||
it('create a new endpoint and check existance of Basic and Power Configuration clusters', () => { | ||
cy.visit('http://localhost:8080/?restPort=9070#/') | ||
cy.addEndpoint('Billing Unit (0x0203)', 'General') | ||
cy.get('#General > .q-expansion-item__container > .q-item').click() | ||
cy.get('tbody') | ||
.children() | ||
.should('contain', 'Basic') | ||
.and('contain', 'Power Configuration') | ||
}) | ||
it('Search for power', () => { | ||
cy.get( | ||
'.col-4 > .q-field__inner > .q-field__control > .q-field__control-container > input' | ||
) | ||
.clear({ force: true }) | ||
.type('power', { force: true }) | ||
}) | ||
it('check if search result is correct', () => { | ||
cy.get('tbody').children().contains('Basic').should('not.exist') | ||
cy.get('tbody').children().should('contain', 'Power Configuration') | ||
}) | ||
}) |
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
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
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
Oops, something went wrong.