mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-19 01:50:06 +00:00
ci: sasjs tests
This commit is contained in:
@@ -14,12 +14,15 @@ context('sasjs-tests', function () {
|
|||||||
|
|
||||||
it('Should have all tests successfull', (done) => {
|
it('Should have all tests successfull', (done) => {
|
||||||
cy.get('body').then(($body) => {
|
cy.get('body').then(($body) => {
|
||||||
|
cy.wait(1000).then(() => {
|
||||||
const startButton = $body.find(
|
const startButton = $body.find(
|
||||||
'.ui.massive.icon.primary.left.labeled.button'
|
'.ui.massive.icon.primary.left.labeled.button'
|
||||||
)[0]
|
)[0]
|
||||||
cy.wait(1000)
|
|
||||||
|
|
||||||
if (startButton && !Cypress.dom.isVisible(startButton)) {
|
if (
|
||||||
|
!startButton ||
|
||||||
|
(startButton && !Cypress.dom.isVisible(startButton))
|
||||||
|
) {
|
||||||
cy.get('input[placeholder="User Name"]').type(username)
|
cy.get('input[placeholder="User Name"]').type(username)
|
||||||
cy.get('input[placeholder="Password"]').type(password)
|
cy.get('input[placeholder="Password"]').type(password)
|
||||||
cy.get('.submit-button').click()
|
cy.get('.submit-button').click()
|
||||||
@@ -46,15 +49,19 @@ context('sasjs-tests', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it('Should have all tests successfull with debug on', (done) => {
|
it('Should have all tests successfull with debug on', (done) => {
|
||||||
cy.get('body').then(($body) => {
|
cy.get('body').then(($body) => {
|
||||||
|
cy.wait(1000).then(() => {
|
||||||
const startButton = $body.find(
|
const startButton = $body.find(
|
||||||
'.ui.massive.icon.primary.left.labeled.button'
|
'.ui.massive.icon.primary.left.labeled.button'
|
||||||
)[0]
|
)[0]
|
||||||
cy.wait(1000)
|
|
||||||
|
|
||||||
if (startButton && !Cypress.dom.isVisible(startButton)) {
|
if (
|
||||||
|
!startButton ||
|
||||||
|
(startButton && !Cypress.dom.isVisible(startButton))
|
||||||
|
) {
|
||||||
cy.get('input[placeholder="User Name"]').type(username)
|
cy.get('input[placeholder="User Name"]').type(username)
|
||||||
cy.get('input[placeholder="Password"]').type(password)
|
cy.get('input[placeholder="Password"]').type(password)
|
||||||
cy.get('.submit-button').click()
|
cy.get('.submit-button').click()
|
||||||
@@ -86,3 +93,4 @@ context('sasjs-tests', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user