diff --git a/packages/backend/src/apps/deepl/auth/is-still-verified.ts b/packages/backend/src/apps/deepl/auth/is-still-verified.ts
index 95a1ef29..66bb963e 100644
--- a/packages/backend/src/apps/deepl/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/deepl/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import verifyCredentials from './verify-credentials';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- await verifyCredentials($);
- return true;
- } catch (error) {
- return false;
- }
+ await verifyCredentials($);
+ return true;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/discord/auth/is-still-verified.ts b/packages/backend/src/apps/discord/auth/is-still-verified.ts
index b34d1517..fadd0880 100644
--- a/packages/backend/src/apps/discord/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/discord/auth/is-still-verified.ts
@@ -2,13 +2,9 @@ import { IGlobalVariable } from '@automatisch/types';
import getCurrentUser from '../common/get-current-user';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- await getCurrentUser($);
+ await getCurrentUser($);
- return true;
- } catch (error) {
- return false;
- }
+ return true;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/flickr/auth/is-still-verified.ts b/packages/backend/src/apps/flickr/auth/is-still-verified.ts
index 76547cc8..634776a9 100644
--- a/packages/backend/src/apps/flickr/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/flickr/auth/is-still-verified.ts
@@ -1,17 +1,13 @@
import { IGlobalVariable } from '@automatisch/types';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- const params = {
- method: 'flickr.test.login',
- format: 'json',
- nojsoncallback: 1,
- };
- const response = await $.http.get('/rest', { params });
- return !!response.data.user.id;
- } catch (error) {
- return false;
- }
+ const params = {
+ method: 'flickr.test.login',
+ format: 'json',
+ nojsoncallback: 1,
+ };
+ const response = await $.http.get('/rest', { params });
+ return !!response.data.user.id;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/github/auth/is-still-verified.ts b/packages/backend/src/apps/github/auth/is-still-verified.ts
index 060ad5cd..befb7694 100644
--- a/packages/backend/src/apps/github/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/github/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import getCurrentUser from '../common/get-current-user';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- const user = await getCurrentUser($);
- return !!user.id;
- } catch (error) {
- return false;
- }
+ const user = await getCurrentUser($);
+ return !!user.id;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/salesforce/auth/is-still-verified.ts b/packages/backend/src/apps/salesforce/auth/is-still-verified.ts
index 8f578344..d36919f2 100644
--- a/packages/backend/src/apps/salesforce/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/salesforce/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import getCurrentUser from '../common/get-current-user';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- const user = await getCurrentUser($);
- return !!user;
- } catch (error) {
- return false;
- }
+ const user = await getCurrentUser($);
+ return !!user;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/slack/auth/is-still-verified.ts b/packages/backend/src/apps/slack/auth/is-still-verified.ts
index 060ad5cd..befb7694 100644
--- a/packages/backend/src/apps/slack/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/slack/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import getCurrentUser from '../common/get-current-user';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- const user = await getCurrentUser($);
- return !!user.id;
- } catch (error) {
- return false;
- }
+ const user = await getCurrentUser($);
+ return !!user.id;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/smtp/auth/is-still-verified.ts b/packages/backend/src/apps/smtp/auth/is-still-verified.ts
index 95a1ef29..66bb963e 100644
--- a/packages/backend/src/apps/smtp/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/smtp/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import verifyCredentials from './verify-credentials';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- await verifyCredentials($);
- return true;
- } catch (error) {
- return false;
- }
+ await verifyCredentials($);
+ return true;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/twilio/auth/is-still-verified.ts b/packages/backend/src/apps/twilio/auth/is-still-verified.ts
index 95a1ef29..66bb963e 100644
--- a/packages/backend/src/apps/twilio/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/twilio/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import verifyCredentials from './verify-credentials';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- await verifyCredentials($);
- return true;
- } catch (error) {
- return false;
- }
+ await verifyCredentials($);
+ return true;
};
export default isStillVerified;
diff --git a/packages/backend/src/apps/twitter/auth/is-still-verified.ts b/packages/backend/src/apps/twitter/auth/is-still-verified.ts
index 8f578344..d36919f2 100644
--- a/packages/backend/src/apps/twitter/auth/is-still-verified.ts
+++ b/packages/backend/src/apps/twitter/auth/is-still-verified.ts
@@ -2,12 +2,8 @@ import { IGlobalVariable } from '@automatisch/types';
import getCurrentUser from '../common/get-current-user';
const isStillVerified = async ($: IGlobalVariable) => {
- try {
- const user = await getCurrentUser($);
- return !!user;
- } catch (error) {
- return false;
- }
+ const user = await getCurrentUser($);
+ return !!user;
};
export default isStillVerified;
diff --git a/packages/backend/src/graphql/queries/test-connection.ts b/packages/backend/src/graphql/queries/test-connection.ts
index 1fa4d036..3782b53e 100644
--- a/packages/backend/src/graphql/queries/test-connection.ts
+++ b/packages/backend/src/graphql/queries/test-connection.ts
@@ -22,7 +22,12 @@ const testConnection = async (
const app = await App.findOneByKey(connection.key, false);
const $ = await globalVariable({ connection, app });
- const isStillVerified = await app.auth.isStillVerified($);
+ let isStillVerified;
+ try {
+ isStillVerified = !!(await app.auth.isStillVerified($));
+ } catch {
+ isStillVerified = false;
+ }
connection = await connection.$query().patchAndFetch({
formattedData: connection.formattedData,
diff --git a/packages/e2e-tests/cypress.config.js b/packages/e2e-tests/cypress.config.js
index a9b1bc3e..dac0771b 100644
--- a/packages/e2e-tests/cypress.config.js
+++ b/packages/e2e-tests/cypress.config.js
@@ -8,7 +8,7 @@ module.exports = defineConfig({
env: {
login_email: 'user@automatisch.io',
login_password: 'sample',
- slack_user_token: TO_BE_PROVIDED,
+ deepl_auth_key: TO_BE_PROVIDED,
},
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
viewportWidth: 1280,
diff --git a/packages/e2e-tests/cypress/e2e/apps/list-apps.js b/packages/e2e-tests/cypress/e2e/apps/list-apps.js
index 908eafac..e36b7125 100644
--- a/packages/e2e-tests/cypress/e2e/apps/list-apps.js
+++ b/packages/e2e-tests/cypress/e2e/apps/list-apps.js
@@ -20,7 +20,9 @@ describe('Apps page', () => {
context('can add connection', () => {
before(() => {
- cy.og('add-connection-button').click();
+ cy
+ .og('add-connection-button')
+ .click({ force: true });
});
it('lists applications', () => {
@@ -28,14 +30,14 @@ describe('Apps page', () => {
});
it('searches an application', () => {
- cy.og('search-for-app-text-field').type('Slack');
+ cy.og('search-for-app-text-field').type('DeepL');
cy.og('app-list-item').should('have.length', 1);
});
it('goes to app page to create a connection', () => {
cy.og('app-list-item').first().click();
- cy.location('pathname').should('equal', '/app/slack/connections/add');
+ cy.location('pathname').should('equal', '/app/deepl/connections/add');
cy.og('add-app-connection-dialog').should('be.visible');
});
@@ -43,7 +45,7 @@ describe('Apps page', () => {
it('closes the dialog on backdrop click', () => {
cy.clickOutside();
- cy.location('pathname').should('equal', '/app/slack/connections');
+ cy.location('pathname').should('equal', '/app/deepl/connections');
cy.og('add-app-connection-dialog').should('not.exist');
});
});
diff --git a/packages/e2e-tests/cypress/e2e/connections/create-connection.js b/packages/e2e-tests/cypress/e2e/connections/create-connection.js
index 7d01d0f7..8cff984e 100644
--- a/packages/e2e-tests/cypress/e2e/connections/create-connection.js
+++ b/packages/e2e-tests/cypress/e2e/connections/create-connection.js
@@ -5,41 +5,44 @@ describe('Connections page', () => {
cy.login();
cy.og('apps-page-drawer-link').click();
+
+ cy.visit('/app/deepl/connections');
});
after(() => {
cy.logout();
});
- it('opens via applications page', () => {
+ it('shows connections if any', () => {
cy.og('apps-loader').should('not.exist');
- cy.og('app-row').contains('Slack').click();
-
- cy.og('app-connection-row').should('be.visible');
-
- cy.ss('Slack connections before creating a connection');
+ cy.ss('DeepL connections before creating a connection');
});
context('can add connection', () => {
it('has a button to open add connection dialog', () => {
- cy.og('add-connection-button').scrollIntoView().should('be.visible');
+ cy.scrollTo('top', { ensureScrollable: false });
+
+ cy
+ .og('add-connection-button')
+ .should('be.visible');
});
it('add connection button takes user to add connection page', () => {
- cy.og('add-connection-button').click({ force: true });
+ cy.og('add-connection-button').click();
- cy.location('pathname').should('equal', '/app/slack/connections/add');
+ cy.location('pathname').should('equal', '/app/deepl/connections/add');
});
it('shows add connection dialog to create a new connection', () => {
- cy.get('input[name="accessToken"]').type(Cypress.env('slack_user_token'));
+ cy.get('input[name="screenName"]').type('e2e-test connection!');
+ cy.get('input[name="authenticationKey"]').type(Cypress.env('deepl_auth_key'));
cy.og('create-connection-button').click();
cy.og('create-connection-button').should('not.exist');
- cy.ss('Slack connections after creating a connection');
+ cy.ss('DeepL connections after creating a connection');
});
});
});
diff --git a/packages/e2e-tests/cypress/e2e/executions/display-execution.js b/packages/e2e-tests/cypress/e2e/executions/display-execution.js
index 945b987e..62064fa6 100644
--- a/packages/e2e-tests/cypress/e2e/executions/display-execution.js
+++ b/packages/e2e-tests/cypress/e2e/executions/display-execution.js
@@ -26,9 +26,7 @@ describe('Execution page', () => {
cy.ss('Execution - data out');
});
- it('displays error', () => {
- cy.og('error-tab').click({ multiple: true, force: true });
-
- cy.ss('Execution - error');
+ it('does not display error', () => {
+ cy.og('error-tab').should('not.exist');
});
});
diff --git a/packages/e2e-tests/cypress/e2e/flow-editor/create-flow.js b/packages/e2e-tests/cypress/e2e/flow-editor/create-flow.js
index 84efbd09..ad175e7b 100644
--- a/packages/e2e-tests/cypress/e2e/flow-editor/create-flow.js
+++ b/packages/e2e-tests/cypress/e2e/flow-editor/create-flow.js
@@ -77,19 +77,19 @@ describe('Flow editor page', () => {
});
});
- context('arrange Slack action', () => {
+ context('arrange DeepL action', () => {
context('choose app and event substep', () => {
it('choose application', () => {
cy.og('choose-app-autocomplete').click();
- cy.get('li[role="option"]:contains("Slack")').click();
+ cy.get('li[role="option"]:contains("DeepL")').click();
});
it('choose an event', () => {
cy.og('choose-event-autocomplete').should('be.visible').click();
cy.get(
- 'li[role="option"]:contains("Send a message to channel")'
+ 'li[role="option"]:contains("Translate Text")'
).click();
});
@@ -120,13 +120,7 @@ describe('Flow editor page', () => {
});
context('set up action', () => {
- it('choose channel', () => {
- cy.og('parameters.channel-autocomplete').click();
-
- cy.get('li[role="option"]').last().click();
- });
-
- it('arrange message text', () => {
+ it('arrange text', () => {
cy.og('power-input', ' [contenteditable]')
.click()
.type(
@@ -141,7 +135,15 @@ describe('Flow editor page', () => {
cy.clickOutside();
- cy.ss('Slack action message text');
+ cy.ss('DeepL action text');
+ });
+
+ it('set target language', () => {
+ cy.og('parameters.targetLanguage-autocomplete').click();
+
+ cy.get(
+ 'li[role="option"]:contains("Turkish")'
+ ).first().click();
});
it('continue to next step', () => {
@@ -161,7 +163,7 @@ describe('Flow editor page', () => {
cy.og('flow-test-substep-output').should('be.visible');
- cy.ss('Slack action test output');
+ cy.ss('DeepL action test output');
cy.og('flow-substep-continue-button').click();
});
diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts
index 0685adf4..6701a7c5 100644
--- a/packages/types/index.d.ts
+++ b/packages/types/index.d.ts
@@ -40,6 +40,7 @@ export interface IExecution {
flowId: string;
flow: IFlow;
testRun: boolean;
+ status: 'success' | 'failure';
executionSteps: IExecutionStep[];
updatedAt: string;
createdAt: string;
diff --git a/packages/web/src/components/ExecutionRow/index.tsx b/packages/web/src/components/ExecutionRow/index.tsx
index f56abcd1..114162cd 100644
--- a/packages/web/src/components/ExecutionRow/index.tsx
+++ b/packages/web/src/components/ExecutionRow/index.tsx
@@ -57,6 +57,16 @@ export default function ExecutionRow(
/>
)}
+
+
theme.palette.primary.main }}
/>
diff --git a/packages/web/src/components/ExecutionStep/index.tsx b/packages/web/src/components/ExecutionStep/index.tsx
index 7d4c7fe2..106d03db 100644
--- a/packages/web/src/components/ExecutionStep/index.tsx
+++ b/packages/web/src/components/ExecutionStep/index.tsx
@@ -51,6 +51,7 @@ export default function ExecutionStep(
const validationStatusIcon =
executionStep.status === 'success' ? validIcon : errorIcon;
+ const hasError = !!executionStep.errorDetails;
return (
@@ -86,7 +87,7 @@ export default function ExecutionStep(
>
-
+ {hasError && }
@@ -98,9 +99,11 @@ export default function ExecutionStep(
-
-
-
+ {hasError && (
+
+
+
+ )}
);
diff --git a/packages/web/src/graphql/queries/get-executions.ts b/packages/web/src/graphql/queries/get-executions.ts
index 1c015677..653426a9 100644
--- a/packages/web/src/graphql/queries/get-executions.ts
+++ b/packages/web/src/graphql/queries/get-executions.ts
@@ -13,6 +13,7 @@ export const GET_EXECUTIONS = gql`
testRun
createdAt
updatedAt
+ status
flow {
id
name
diff --git a/packages/web/src/locales/en.json b/packages/web/src/locales/en.json
index a18afad8..4d79ee2b 100644
--- a/packages/web/src/locales/en.json
+++ b/packages/web/src/locales/en.json
@@ -74,6 +74,8 @@
"executions.noExecutions": "There is no execution data point to show.",
"execution.executedAt": "executed {datetime}",
"execution.test": "Test run",
+ "execution.statusSuccess": "Success",
+ "execution.statusFailure": "Failure",
"execution.noDataTitle": "No data",
"execution.noDataMessage": "We successfully ran the execution, but there was no new data to process.",
"profileSettings.title": "My Profile",
@@ -86,4 +88,4 @@
"profileSettings.updatePassword": "Update password",
"notifications.title": "Notifications",
"notification.releasedAt": "Released {relativeDate}"
-}
+}
\ No newline at end of file