mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-18 01:20:05 +00:00
ci: sasjs tests
This commit is contained in:
@@ -14,75 +14,83 @@ 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) => {
|
||||||
const startButton = $body.find(
|
cy.wait(1000).then(() => {
|
||||||
'.ui.massive.icon.primary.left.labeled.button'
|
const startButton = $body.find(
|
||||||
)[0]
|
'.ui.massive.icon.primary.left.labeled.button'
|
||||||
cy.wait(1000)
|
)[0]
|
||||||
|
|
||||||
if (startButton && !Cypress.dom.isVisible(startButton)) {
|
if (
|
||||||
cy.get('input[placeholder="User Name"]').type(username)
|
!startButton ||
|
||||||
cy.get('input[placeholder="Password"]').type(password)
|
(startButton && !Cypress.dom.isVisible(startButton))
|
||||||
cy.get('.submit-button').click()
|
) {
|
||||||
}
|
cy.get('input[placeholder="User Name"]').type(username)
|
||||||
|
cy.get('input[placeholder="Password"]').type(password)
|
||||||
|
cy.get('.submit-button').click()
|
||||||
|
}
|
||||||
|
|
||||||
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
||||||
.click()
|
.click()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('.ui.massive.loading.primary.button', {
|
cy.get('.ui.massive.loading.primary.button', {
|
||||||
timeout: testingFinishTimeout
|
timeout: testingFinishTimeout
|
||||||
})
|
|
||||||
.should('not.exist')
|
|
||||||
.then(() => {
|
|
||||||
cy.get('span.icon.failed')
|
|
||||||
.should('not.exist')
|
|
||||||
.then(() => {
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
.should('not.exist')
|
||||||
})
|
.then(() => {
|
||||||
|
cy.get('span.icon.failed')
|
||||||
|
.should('not.exist')
|
||||||
|
.then(() => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
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) => {
|
||||||
const startButton = $body.find(
|
cy.wait(1000).then(() => {
|
||||||
'.ui.massive.icon.primary.left.labeled.button'
|
const startButton = $body.find(
|
||||||
)[0]
|
'.ui.massive.icon.primary.left.labeled.button'
|
||||||
cy.wait(1000)
|
)[0]
|
||||||
|
|
||||||
if (startButton && !Cypress.dom.isVisible(startButton)) {
|
if (
|
||||||
cy.get('input[placeholder="User Name"]').type(username)
|
!startButton ||
|
||||||
cy.get('input[placeholder="Password"]').type(password)
|
(startButton && !Cypress.dom.isVisible(startButton))
|
||||||
cy.get('.submit-button').click()
|
) {
|
||||||
}
|
cy.get('input[placeholder="User Name"]').type(username)
|
||||||
|
cy.get('input[placeholder="Password"]').type(password)
|
||||||
|
cy.get('.submit-button').click()
|
||||||
|
}
|
||||||
|
|
||||||
cy.get('.ui.fitted.toggle.checkbox label')
|
cy.get('.ui.fitted.toggle.checkbox label')
|
||||||
.click()
|
.click()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
||||||
.click()
|
.click()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('.ui.massive.loading.primary.button', {
|
cy.get('.ui.massive.loading.primary.button', {
|
||||||
timeout: testingFinishTimeout
|
timeout: testingFinishTimeout
|
||||||
})
|
|
||||||
.should('not.exist')
|
|
||||||
.then(() => {
|
|
||||||
cy.get('span.icon.failed')
|
|
||||||
.should('not.exist')
|
|
||||||
.then(() => {
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
.should('not.exist')
|
||||||
})
|
.then(() => {
|
||||||
})
|
cy.get('span.icon.failed')
|
||||||
|
.should('not.exist')
|
||||||
|
.then(() => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user