mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 17:10:05 +00:00
chore(sasjsTests): debugging
This commit is contained in:
@@ -5,8 +5,9 @@ const testingFinishTimeout = Cypress.env('testingFinishTimeout')
|
|||||||
|
|
||||||
context('sasjs-tests', function () {
|
context('sasjs-tests', function () {
|
||||||
this.beforeAll(() => {
|
this.beforeAll(() => {
|
||||||
console.log(`🤖[beforeAll]🤖`)
|
cy.task('log', 'beforeAll')
|
||||||
console.log(`🤖[sasjsTestsUrl]🤖`, sasjsTestsUrl)
|
cy.task('log', `sasjsTestsUrl: ${sasjsTestsUrl}`)
|
||||||
|
|
||||||
cy.visit(sasjsTestsUrl)
|
cy.visit(sasjsTestsUrl)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -15,23 +16,25 @@ context('sasjs-tests', function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('Should have all tests successfull', (done) => {
|
it('Should have all tests successfull', (done) => {
|
||||||
console.log(`🤖[Should have all tests successfull]🤖`)
|
cy.task('log', `Should have all tests successfull`)
|
||||||
|
|
||||||
cy.get('body').then(($body) => {
|
cy.get('body').then(($body) => {
|
||||||
console.log(`🤖[18]🤖`, 18)
|
cy.task('log', `22`)
|
||||||
cy.wait(1000).then(() => {
|
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]
|
||||||
|
|
||||||
console.log(`🤖[startButton]🤖`, startButton)
|
cy.task('log', `startButton: ${startButton}`)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!startButton ||
|
!startButton ||
|
||||||
(startButton && !Cypress.dom.isVisible(startButton))
|
(startButton && !Cypress.dom.isVisible(startButton))
|
||||||
) {
|
) {
|
||||||
console.log(`🤖[31]🤖`, 31)
|
cy.task('log', `34`)
|
||||||
console.log(`🤖[username]🤖`, username)
|
cy.task('log', `username: ${username}`)
|
||||||
console.log(`🤖[password]🤖`, password)
|
cy.task('log', `password: ${password}`)
|
||||||
|
|
||||||
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()
|
||||||
@@ -40,21 +43,21 @@ context('sasjs-tests', function () {
|
|||||||
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(`🤖[42]🤖`, 42)
|
cy.task('log', `46`)
|
||||||
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
||||||
.click()
|
.click()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(`🤖[46]🤖`, 46)
|
cy.task('log', `50`)
|
||||||
cy.get('.ui.massive.loading.primary.button', {
|
cy.get('.ui.massive.loading.primary.button', {
|
||||||
timeout: testingFinishTimeout
|
timeout: testingFinishTimeout
|
||||||
})
|
})
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(`🤖[52]🤖`, 52)
|
cy.task('log', `56`)
|
||||||
cy.get('span.icon.failed')
|
cy.get('span.icon.failed')
|
||||||
.should('not.exist')
|
.should('not.exist')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log(`🤖[56]🤖`, 56)
|
cy.task('log', `60`)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user