Code Monkey home page Code Monkey logo

dkt.flows's People

Contributors

alexthewilde avatar bekos avatar brandonroberts avatar colinskow avatar davidwabnitz avatar ijager avatar jmandreslopez avatar kylecannon avatar mmrath avatar mscosti avatar qdouble avatar saschajankowiak avatar shankarsumanth avatar smyth64 avatar tuizi avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dkt.flows's Issues

Handle user errors

Spec

  • it should show "You don't have permission to access this flow|task" for status code 401
  • it should show "Flow|Task not found" for status code 404

deployment setup

Requirements

  • serve app at dkt.flows.test.s3-website-eu-west-1.amazonaws.com from a dedicated S3 bucket
  • automate deployment with script
  • @johannes fix HTML5 mode: configure AWS API Gateway to map relative paths e.g. /flows/... to /index.html

application setup

Scope

  • application structure
  • UI library
  • testing stack
  • build chain

Specs

  • I get "Hello world" view at localhost
  • I can run e2e test for "Hello world" view

continuous testing

Specs

  • the test suite should run automatically upon updates to develop branch

After running a flow the flow stays deactivated

Description

Expected Behavior

When I run a flow, then the flow should automatically get activated.

Actual Behavior

After run a flow, the 'Active' UI remains inactive until the current editing flow is reloaded.

Possible Fix

The API response falsely returns flow.active = false for the startFlowRun call.

authenticate user with AWS UserPool

Specs

  • I can register with an email address and password
  • I can enter the confirmation code sent to my email address
  • I can login using an email address and password
  • I can request a new password

Approve Text task type

Specs

  • displays a text widget
  • I can “Approve” the text
  • I can “Reject” the text

Display api version info

Related to kreuzwerker/DKT.flows-engine#99

The purpose of this feature is to avoid confusion among developers and testers about which current version of the API codebase is deployed in a given environment.

Spec

  • I can access info about the current API version via Account > API info

manual flow run

Specs

  • I can start a manual flow run by clicking on a button
  • The user should be prompted to enter the payload into a textarea
  • call startFlowRun(flowId, user, payload) with a mocked userId
  • display message "Flow successfully triggered"
  • require flow to be fully configured

multilingual UI

Specs

  • it should be possible to switch the UI language between en and de
  • it should be possible to the translate UI in a file or another interface

Re-usable step test datasets

Specs

  • it should list the latest input data payloads (max. 5 samples in deviation from 'Test Trigger'-Screen). If none exists it should display an empty form for entering a sample manually (see. 'Test Action No Data Sample'-Screen)
  • I can enter or edit a test data sample by filling or modifying data in the respective form:
    • enter a data summary, enter or modify the data (text, json, csv etc.)
    • click on "Test" to test the action with the sample data ('Save' not necessary; i.e. no backend for persistence is required)
    • I can "Cancel": the data sample from should reset
  • I can run a test with an existing data sample
  • If the test fails, a step configuration summary consisting of the first three settings is displayed with the possibility to show all configuration settings.
  • Status colors and screen layout and elements are defined in the 'Workflow Setup'-Section of the DKT Invision prototype https://projects.invisionapp.com/d/main#/projects/prototypes/7693881

Basic test run 2017-11-16 14:09

Basic testing script

This testing script serves as a basic manual testing procedure to follow when testing new features or conducting regression tests.
Only end-to-end scenarios along a 'happy path' are being tested.

Preconditions are fulfilled:

  • Browser: latest Chrome
  • Environment: testing
  • Test user exists but is initially signed out
  • Browser data has been cleared prior to testing

Testing scenarios

Create flow

  • I can create a flow with name 'basic test' and description 'desc'.
  • I am redirected to a new flow with respective name and description, am in the context of the first trigger step setup and can see service catalog for selecting a trigger
  • I can't deploy the flow.
  • I can select and save the trigger RSS -> 'URL Config' and am redirected to the 'Configure Trigger' screen.
  • I can enter a URL and continue to the 'Test Trigger' screen.
  • I can 'Skip Test and Finish' and am prompted to 'Add Action'
  • I can't deploy the flow.
  • I can select and save the action RSS -> 'Fetch Article' and am redirected to the 'Configure Action' screen.
  • I can continue to the 'Test Action' screen.
  • I can 'Skip Test and Finish' and am prompted to 'Deploy Flow'
  • I can deploy the flow successfully and am prompted to 'Activate Flow'.
  • I can activate the flow successfully and am prompted to 'Trigger manually'.
  • I can visit 'Flows' (list) and can see the 'basic test' flow with status activated.

Trigger flow manually

Precondition is the successful completion of the 'Create flow' scenario.

  • I can trigger the 'basic test' flow manually on the flow edit screen by clicking on 'Trigger manually', am prompted to enter a payload and get a success message when clicking the OK button.
  • I can trigger the 'basic test' flow manually on the flow edit screen by clicking on the play-icon, am prompted to enter a payload and get a success message when clicking the OK button.

View flow log

Precondition is the successful completion of the 'Trigger flow manually' scenario.

  • I can access the flow logs from the flow edit screen and see a list of previous flow runs.
  • I can use the context menu of the 'basic test' flow on the 'Flows' (list) screen to access the flow logs.
  • When I manually trigger the flow at least 6 times, I can only see the most recent 5 flow run log items and can access older ones by clicking on 'Older'. I can successfully navigate the paginated list back to newer items by clicking on 'Newer'.

Filter flow log

Preconditions:

  • successful completion of the 'Trigger flow manually' scenario.

  • Invalid URL for the 'URL Config' step configuration.

  • When I trigger the flow manually at least once, I can see at least one error run log item.

  • I can filter for error run log items only.

  • I can filter for successful run log items only.

  • I can view all log items.

Add and remove action step

Precondition is the successful completion of the 'Create flow' scenario.

  • I can add and configure an RSS -> 'Extract Article' action step as the last step of the 'basic test' flow.
  • I can't deploy the flow until I 'Skip Test and Finish'.
  • I can deploy the flow.
  • I can trigger the removal of the 'Extract Article' action step by clicking on the 'Remove Action' link and am being prompted for confirmation.
  • I can remove the step by confirming the removal and am prompted to deploy the flow.
  • I can deploy the flow successfully.

Delete flow

Precondition is the successful completion of the 'Create flow' scenario.
Note down or copy the flow URL.

  • I can use the context menu of the 'basic test' flow to trigger deletion of the flow.
  • I am prompted for confirmation to delete the flow.
  • I can delete the flow and the 'basic test' flow is not visible when I visit 'Flows' (list).
  • I can't access the flow by calling the flow url directly (as previously copied).

Retested issues

  • When I manually trigger the flow so many times that a total of a multiple of 5 log items exists and I do a refresh and cycle to the last page of the paginated list, then I see an empty list (expected behaviour: an 'Older' button should only be displayed, if a multiple of 5+1 items exists for the given filter setting. Result: Issue fixed but new similar issue.
  • When I manually trigger the flow so many times that a total of a multiple of 5+1 log items exists and I am on a paginated page of the log items list, then the list does not update with new log items when hitting the refresh button, but an 'Older' button is displayed. Result: Issue fixed but new similar issue.
  • When I filter for successful log runs (given error log runs exist) and am on a paginated view, then the pagination is based on all items in the list, not on the filtered list. For example: Given I have a list of more than 5 success logs and given 3 error logs and 2 success logs are on a specific page, and if I filter for 'Success', then only two items are displayed on a page. If I filter for error, then 3 are displayed. I'd expect the pagination to be based on the filtered list, not on the total list. Result: Issue is fixed.

Discovered issues

  • When I manually trigger the flow so many times that a total of a multiple of 5 log items exists and I do a refresh and cycle to the last page of the paginated list, then I see an 'Older' button (expected behaviour: an 'Older' button should only be displayed, if a multiple of 5+1 items exists for the given filter setting).
    • Cannot reproduce this: on a flow with only 5 logs you cannot "cycle to the last page" because there are no pages. An 'Older' button isn't showing up.
  • When I manually trigger the flow so many times that I can use the 'Older' button and then the 'Newer' button and then the 'Older' button, then the 'Newer' button is not displayed any more.
  • When I manually trigger the flow so many times that a total of a multiple of 5+1 log items exists and I am on a paginated page of the log items list, then the list does not update with new log items when hitting the refresh button, but a 'Newer' button is displayed which doesn't work (i.e. can't be used to cycle the list). Expected behaviour: as new log entries are added to the beginning of the list it should repaginate when doing a refresh of the list.

Other comments

None

remove action flow step

Specs

  • I can remove an action step by clicking on the "Remove this step" button
  • I should be prompted to confirm "Are you sure?"
  • API: remove action step
  • TDB: update step positions server-side? DECISION sequential positions not relevant atm
  • I cannot remove a trigger step

create new flow

Specs

  • I can open the creation modal dialog by clicking on the "create flow" button
  • I can set title and description
  • I can create the new flow by clicking on "save"
  • I can cancel the dialog by clicking on "cancel". The modal dialog should close.
  • API: should create a new (persisted) flow
  • Upon successful creation, I should get redirected to the flow edit view

test flow step

Specs

  • I can enter the test payload json into a textarea
  • I can start the step test
  • API: start new step test
  • Show the test result
  • If I haven't started a test yet or if the test failed, I can "skip test and finish" and the "add step" dialog should finish
  • If a test was successful, I can click on "continue" and the "add step" dialog should finish
  • I can go to the previous "configure step"

UI state issues when viewing flow logs

Description

Expected Behavior

Flow log screen is displayed with list of log items (expandable) and fuctioning paginated navigation controls.

Actual Behavior

Screen layout is broken. UI elements are rendered incomplete. See screenshot:

dkt_flows

Possible Fix

Steps to Reproduce

  1. View logs either from flow edit or flow list screen (not displayed correctly)
  2. Click 'Select Trigger' of first flow step.
  3. Repeat above to create more havoc :)

Context

Trying to view the flow logs.

Your Environment

  • Environment used: branch dev, commit 019e256:
  • Browser Name and version: Chrome Canary (latest); browser caching enabled.
  • Operating System and version (desktop or mobile): macOS High Sierra

Update dependencies

Updates

  • angular-webpack2-starter
  • Angular 4.4.6
  • Angular Material
  • ng2-dynamic-forms
  • flex-layout
  • RxJS
  • angular-redux
  • Apollo
  • (remaining packages)

integrate Apollo client

Specs

  • integrate Apollo client with application
  • refactor app to use GraphQL endpoints instead of Mock REST API endpoints
  • the Apollo client and the application should share one common Redux store

task comments

Specs

  • list all task comments by creation date descending
  • I can create a new task comment by entering text in the comment form and clicking on “comment"
  • I can reset the task comment form by clicking on “cancel”

MISSING task comments persistence

task description

Specs

  • displays the creation date and labels of the selected task
  • I can collapse the task description

add flow step

Specs

  • if the flow already has steps, then I can add another step by clicking on the "add step" button
  • I can select a service step and click on "continue"
  • API: create a new flow step

Basic test run 2017-11-08 15:10

Basic testing script

This testing script serves as a basic manual testing procedure to follow when testing new features or conducting regression tests.
Only end-to-end scenarios along a 'happy path' are being tested.

Preconditions are fulfilled:

  • Browser: latest Chrome
  • Environment: dev
  • Test user exists but is initially signed out
  • Browser data has been cleared prior to testing

Testing scenarios

Create flow

  • I can create a flow with name 'basic test' and description 'desc'.
  • I am redirected to a new flow with respective name and description, am in the context of the first trigger step setup and can see service catalog for selecting a trigger
  • I can't deploy the flow.
  • I can select and save the trigger RSS -> 'URL Config' and am redirected to the 'Configure Trigger' screen.
  • I can enter a URL and continue to the 'Test Trigger' screen.
  • I can 'Skip Test and Finish' and am prompted to 'Add Action'
  • I can't deploy the flow.
  • I can select and save the action RSS -> 'Fetch Article' and am redirected to the 'Configure Action' screen.
  • I can continue to the 'Test Action' screen.
  • I can 'Skip Test and Finish' and am prompted to 'Deploy Flow'
  • I can deploy the flow successfully.
  • I can visit 'Flows' (list) and can see the 'basic test' flow

Trigger flow manually

Precondition is the successful completion of the 'Create flow' scenario.

  • I can trigger the 'basic test' flow manually on the flow edit screen by clicking on 'Trigger manually', am prompted to enter a payload and get a success message when clicking the OK button.
  • I can trigger the 'basic test' flow manually on the flow edit screen by clicking on the play-icon, am prompted to enter a payload and get a success message when clicking the OK button.

View flow log

Precondition is the successful completion of the 'Trigger flow manually' scenario.

  • I can access the flow logs from the flow edit screen and see a list of previous flow runs.
  • I can use the context menu of the 'basic test' flow on the 'Flows' (list) screen to access the flow logs.
  • When I manually trigger the flow at least 6 times, I can only see the most recent 5 flow run log items and can access older ones by clicking on 'Older'. I can successfully navigate the paginated list back to newer items by clicking on 'Newer'.

Filter flow log

Preconditions:

  • successful completion of the 'Trigger flow manually' scenario.

  • Invalid URL for the 'URL Config' step configuration.

  • When I trigger the flow manually at least once, I can see at least one error run log item.

  • I can filter for error run log items only.

  • I can filter for successful run log items only.

  • I can view all log items.

Add and remove action step

Precondition is the successful completion of the 'Create flow' scenario.

  • I can add and configure an RSS -> 'Extract Article' action step as the last step of the 'basic test' flow.
  • I can't deploy the flow until I 'Skip Test and Finish'.
  • I can deploy the flow.
  • I can trigger the removal of the 'Extract Article' action step by clicking on the 'Remove Action' link and am being prompted for confirmation.
  • I can remove the step by confirming the removal and am prompted to deploy the flow.
  • I can deploy the flow successfully.

Delete flow

Precondition is the successful completion of the 'Create flow' scenario.
Note down or copy the flow URL.

  • I can use the context menu of the 'basic test' flow to trigger deletion of the flow.
  • I am prompted for confirmation to delete the flow.
  • I can delete the flow and the 'basic test' flow is not visible when I visit 'Flows' (list).
  • I can't access the flow by calling the flow url directly (as previously copied).

Retested issues

  • none

Discovered issues

  • When I manually trigger the flow so many times that a total of a multiple of 5 log items exists and I do a refresh and cycle to the last page of the paginated list, then I see an empty list (expected behaviour: an 'Older' button should only be displayed, if a multiple of 5+1 items exists for the given filter setting.
  • When I manually trigger the flow so many times that a total of a multiple of 5+1 log items exists and I am on a paginated page of the log items list, then the list does not update with new log items when hitting the refresh button, but an 'Older' button is displayed.
  • When I filter for successful log runs (given error log runs exist) and am on a paginated view, then the pagination is based on all items in the list, not on the filtered list. For example: Given I have a list of more than 5 success logs and given 3 error logs and 2 success logs are on a specific page, and if I filter for 'Success', then only two items are displayed on a page. If I filter for error, then 3 are displayed. I'd expect the pagination to be based on the filtered list, not on the total list.

Other comments

None

task controls

Specs

  • I can select a task from the tasks list
  • I can navigate through tasks list via "<" and ">" buttons
  • I can start the selected task
  • I can pause the selected task
  • I can resume the selected task
  • I can finish the selected task
  • I can toggle show/hide the task description
  • I can toggle show/hide the task comments

flow logs

Specs

  • I can view all logs of a flow via clicking the "View logs" icon on the flow edit screen
    • route /flows/ID/logs
  • I can view all logs of a flow via clicking the "View logs" option in the flows list menu
    • route /flows/ID/logs
  • I can toggle the log details and view the message and config summary of the last run step

flow drafts

See API

Specs

  • if flow is in draft mode: Should disable controls (manual trigger, toggle activate) and show draft options "save" and "discard"
  • I can save the current draft: should create new flowRun and enable controls
  • I can discard the current draft of an existing flow: should restore previous flow model and enable controls
  • I can discard a new flow: should delete the flow

activate flow

Specs

  • I can activate/deactivate a flow via the toggle element in the flows list
  • I can activate/deactivate a flow via the toggle element in the flow editor

configure flow step

Specs

  • renders and validates the config form based on the service's config schema
  • persists the config form values in the step
  • determines if step is configured
  • I can click on "continue" to go to "test flow step"

authenticate user with Google SignIn

Specs

  • should show sign-in view instead of requested route if user is not authenticated
  • I can authenticate via Google SignIn
  • Upon authentication I should get redirected to the app home view
  • I can only access flows created by me
  • Should display the currently logged in user's name and avatar
  • I can sign out

NOTE: The Google Sign-in option has been temporarily removed from the client due to on-going difficulties with getting the auth strategy to work with AWS Cognito.

list tasks

Specs

  • lists tasks with task title, creation date and task labels
  • I can collapse/expand sidebar
  • I can toggle the sorting direction descending/ascending
  • tasks are grouped by “in progress” and “everything else” showing counts

Flow settings

Specs

  • I can open a flow's settings by clicking on the settings icon next to the flow name
  • I can close flow settings by either clicking on the "Cancel" or "Save" button in the settings dialog
  • I can edit the flow name
  • I can edit the flow description
  • I can delete the flow (without another confirmation dialog)
  • I can select a triggering type: Manual, Automatic or Scheduled
  • The option 'Automatic' depends on the selected trigger service type
  • For the Scheduled type, I can set a start date, time and an interval

list flows

Specs

  • should expose a "create flow" button in the left sidebar
  • should display "error" flag if a flow had an erroneous last flow run
  • should display "draft" flag if a flow has changes that haven't been deployed yet
  • should display the trigger step's icon, the number of steps in between (do not display, if 0), and the last step's icon
  • should display icon indicating the trigger-step type (i.e. 'manual', 'scheduled', 'external'). 'scheduled' means that the event is scheduled to run at a certain point in time or at a set interval that is to be displayed in a tooltip. 'external' means automatic triggering by some event external to the flow (e.g. S3 put event, Feed new item event, Webhook trigger event, HTTP Post event etc.).
  • should display the flow description (expandable/collapsible; default is collapsed)
  • should have a toggle for activating/deactivating a flow
  • should have flow options with option "Edit" and "Delete" (to be extended)

Connect accounts

Specs – Manage connected accounts

  • On flows overview, I can click on "Connect accounts" in the sidebar menu to access my connect accounts
  • I can see a list of all my connected accounts
  • I can click on an account type icon to create a new account of this type
  • I can click on an account to view and edit the account credentials
  • I can specify an account name e.g. "Kreuzwerker Test S3 account"
  • I can fill out the required account credentials defined by the selected account provider
  • I can click on "Save" to save the changes

Specs – Use a connected account

  • Given a step that requires a connected account, when the user configures the step he should be prompted to select an account from his list of connected accounts
  • The list should be filtered by the required account provider e.g. show only AWS accounts
  • If the user doesn't have any connected account yet for the required provider, then there should be an info message "Please connect to your [provider] account" with a button that redirects the user to "Connected accounts" that displays the 'Add account' dialogue [TBD; don't like the redirect from a dialogue box. Preferably you should be able to add and connect the added account inline from the 'select connected account' dialog box on the flow edit screen].

implement tests

  • implement current test specs where possible (e.g. skip all current tests that involve Apollo until Apollo test utils are available)

generate ASL

Specs

  • generate an ASL object for a flow upon mutating flow steps and flow meta data

filter tasks

Specs

  • I can filter tasks by clicking on task labels: by status “approve”, “review”, by flow
  • I can remove a filter
  • I can reset all filters
  • I can search with typeahead

delete flow

Specs

  • I can delete a flow by clicking on "Delete" in the flows list option menu
  • I should see a confirmation dialog (see mocks)
  • I should see a confirmation notification message “Deleted flow XY"

user call-to-action box

Specs

  • The box should display the info box icon, message and action button for the flow states: MISSING_TRIGGER, UNFINISHED_TRIGGER, MISSING_ACTION, UNFINISHED_ACTION, NOT_ACTIVATED, NOT_TRIGGERED, TRIGGERED

select service step

Specs

  • API: get all services and their action/triggers
  • I see a list of all available services, sorted alphabetically
  • I can click on a service and I should see the service description with all available service triggers and actions
  • I can select a trigger or action
    • If the current flow step is the first step, then I can only select a trigger
    • If the current flow step is not the first step, then I can only select an action
  • The first service step should be preselected

Remaining implementation tasks

  • refactor state store to use normalised entities. This will fix the out-of-sync issue when a service gets selected and the flow step list item doesn't update accordingly. Update: solved through the integration of Apollo client which takes care of App data normalisation.
  • add unit tests specs for all containers, components, reducers, actions and services.
  • refactor components to use changeDetectionStrategy: OnPush. This prepares the app for optimal performance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.