1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-15 18:54:36 +00:00

chore: cypress added and sasjs test written

This commit is contained in:
2021-07-15 14:30:51 +02:00
parent 7cb2a43f95
commit f25035ae1d
11 changed files with 1038 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
const sasjsTestsUrl = Cypress.env('sasjsTestsUrl')
const username = Cypress.env('username')
const password = Cypress.env('password')
const testingFinishTimeout = Cypress.env('testingFinishTimeout')
context('sasjs-tests', function() {
this.beforeAll(() => {
cy.visit(sasjsTestsUrl)
})
it ('Should have all tests successfull', (done) => {
cy.get('body').then($body => {
if ($body.find('input[placeholder="User Name"]').length > 0) {
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}).should('not.exist').then(() => {
cy.get('.ui.massive.icon.primary.left.labeled.button').click().then(() => {
cy.get('.ui.massive.loading.primary.button').should('not.exist').then(() => {
cy.get('span.icon.failed', {timeout: testingFinishTimeout}).should('not.exist').then(() => {
done()
})
})
})
})
})
})
})