diff --git a/cypress/integration/sasjs.tests.ts b/cypress/integration/sasjs.tests.ts index 74fa950..84c29ca 100644 --- a/cypress/integration/sasjs.tests.ts +++ b/cypress/integration/sasjs.tests.ts @@ -3,7 +3,7 @@ const username = Cypress.env('username') const password = Cypress.env('password') const testingFinishTimeout = Cypress.env('testingFinishTimeout') -context('sasjs-tests', function () { +context('sasjs-tests', function() { this.beforeAll(() => { cy.visit(sasjsTestsUrl) }) @@ -12,8 +12,8 @@ context('sasjs-tests', function () { cy.reload() }) - it('Should have all tests successfull', (done) => { - cy.get('body').then(($body) => { + 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) @@ -42,8 +42,8 @@ context('sasjs-tests', function () { }) }) - it('Should have all tests successfull with debug on', (done) => { - cy.get('body').then(($body) => { + it('Should have all tests successfull with debug on', 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) diff --git a/sasjs-tests/src/Login.tsx b/sasjs-tests/src/Login.tsx index a72b458..1a662ef 100644 --- a/sasjs-tests/src/Login.tsx +++ b/sasjs-tests/src/Login.tsx @@ -9,9 +9,9 @@ const Login = (): ReactElement<{}> => { const appContext = useContext(AppContext) const handleSubmit = useCallback( - (e) => { + e => { e.preventDefault() - appContext.adapter.logIn(username, password).then((res) => { + appContext.adapter.logIn(username, password).then(res => { appContext.setIsLoggedIn(res.isLoggedIn) }) }, @@ -28,7 +28,7 @@ const Login = (): ReactElement<{}> => { placeholder="User Name" value={username} required - onChange={(e) => setUsername(e.target.value)} + onChange={e => setUsername(e.target.value)} />
@@ -38,7 +38,7 @@ const Login = (): ReactElement<{}> => { type="password" value={password} required - onChange={(e) => setPassword(e.target.value)} + onChange={e => setPassword(e.target.value)} />