From 593f085b03a17039ce05d5e2f95768287213a42e Mon Sep 17 00:00:00 2001
From: feedmeapples
Date: Thu, 20 Aug 2020 16:59:48 -0700
Subject: [PATCH 1/3] Create workflows page e2e tests
---
.../integration/workflow/workflows.spec.js | 78 +++++++++++++++++++
1 file changed, 78 insertions(+)
create mode 100644 cypress/integration/workflow/workflows.spec.js
diff --git a/cypress/integration/workflow/workflows.spec.js b/cypress/integration/workflow/workflows.spec.js
new file mode 100644
index 00000000..7faf9d15
--- /dev/null
+++ b/cypress/integration/workflow/workflows.spec.js
@@ -0,0 +1,78 @@
+///
+
+context('Workflow', () => {
+ beforeEach(() => {
+ cy.visit('/namespaces/namespace-web-e2e/workflows');
+ });
+
+ it('navigates to open workflows as default', () => {
+ cy.url().should('include', '&status=OPEN');
+ });
+
+ it('filters workflows by status', () => {
+ cy.get('[data-cy=status-filter]')
+ .click()
+ .find('a')
+ .contains('Open')
+ .click();
+ cy.get('[data-cy=workflow-list]')
+ .find('tr')
+ .should('have.length', 4); // 3 open + 1 requested to be canceled
+
+ cy.wait(1000);
+ cy.get('[data-cy=status-filter]')
+ .click()
+ .find('a')
+ .contains('Closed')
+ .click();
+ cy.get('[data-cy=workflow-list]')
+ .find('tr')
+ .should('have.length', 2); // 1 timed out + 1 terminated
+
+ cy.wait(1000);
+ cy.get('[data-cy=status-filter]')
+ .click()
+ .find('a')
+ .contains('Terminated')
+ .click();
+ cy.get('[data-cy=workflow-list]')
+ .find('tr')
+ .should('have.length', 1);
+
+ cy.wait(1000);
+ cy.get('[data-cy=status-filter]')
+ .click()
+ .find('a')
+ .contains('Timed Out')
+ .click();
+ cy.get('[data-cy=workflow-list]')
+ .find('tr')
+ .should('have.length', 1);
+ });
+
+ it('renders workflow execution details', () => {
+ cy.get('[data-cy=workflow-list]')
+ .find('tr')
+ .eq(3)
+ .should('contain.text', 'wf_open1') // workflow id
+ .should('contain.text', 'e2e_type') // workflow type name
+ .should('contain.text', 'running'); // status
+ });
+
+ it('navigates to workflow details', () => {
+ cy.wait(1000);
+ cy.get('[data-cy=status-filter]')
+ .click()
+ .find('a')
+ .contains('Closed')
+ .click();
+ cy.get('[data-cy=workflow-list]')
+ .find('tr')
+ .eq(0)
+ .find('[data-cy=workflow-link]')
+ .click();
+
+ cy.url().should('include', '/namespaces/namespace-web-e2e/workflows/wf_timedout/');
+ cy.url().should('include', '/summary');
+ });
+});
From 02d61c828b0071e489309a6d64c751e0724144a1 Mon Sep 17 00:00:00 2001
From: feedmeapples
Date: Fri, 21 Aug 2020 09:54:42 -0700
Subject: [PATCH 2/3] move e2e tests to the top of integration
---
.../integration/workflow/workflows.spec.js | 78 -------------------
1 file changed, 78 deletions(-)
delete mode 100644 cypress/integration/workflow/workflows.spec.js
diff --git a/cypress/integration/workflow/workflows.spec.js b/cypress/integration/workflow/workflows.spec.js
deleted file mode 100644
index 7faf9d15..00000000
--- a/cypress/integration/workflow/workflows.spec.js
+++ /dev/null
@@ -1,78 +0,0 @@
-///
-
-context('Workflow', () => {
- beforeEach(() => {
- cy.visit('/namespaces/namespace-web-e2e/workflows');
- });
-
- it('navigates to open workflows as default', () => {
- cy.url().should('include', '&status=OPEN');
- });
-
- it('filters workflows by status', () => {
- cy.get('[data-cy=status-filter]')
- .click()
- .find('a')
- .contains('Open')
- .click();
- cy.get('[data-cy=workflow-list]')
- .find('tr')
- .should('have.length', 4); // 3 open + 1 requested to be canceled
-
- cy.wait(1000);
- cy.get('[data-cy=status-filter]')
- .click()
- .find('a')
- .contains('Closed')
- .click();
- cy.get('[data-cy=workflow-list]')
- .find('tr')
- .should('have.length', 2); // 1 timed out + 1 terminated
-
- cy.wait(1000);
- cy.get('[data-cy=status-filter]')
- .click()
- .find('a')
- .contains('Terminated')
- .click();
- cy.get('[data-cy=workflow-list]')
- .find('tr')
- .should('have.length', 1);
-
- cy.wait(1000);
- cy.get('[data-cy=status-filter]')
- .click()
- .find('a')
- .contains('Timed Out')
- .click();
- cy.get('[data-cy=workflow-list]')
- .find('tr')
- .should('have.length', 1);
- });
-
- it('renders workflow execution details', () => {
- cy.get('[data-cy=workflow-list]')
- .find('tr')
- .eq(3)
- .should('contain.text', 'wf_open1') // workflow id
- .should('contain.text', 'e2e_type') // workflow type name
- .should('contain.text', 'running'); // status
- });
-
- it('navigates to workflow details', () => {
- cy.wait(1000);
- cy.get('[data-cy=status-filter]')
- .click()
- .find('a')
- .contains('Closed')
- .click();
- cy.get('[data-cy=workflow-list]')
- .find('tr')
- .eq(0)
- .find('[data-cy=workflow-link]')
- .click();
-
- cy.url().should('include', '/namespaces/namespace-web-e2e/workflows/wf_timedout/');
- cy.url().should('include', '/summary');
- });
-});
From 3499541beeef26224fd737151b0739d3e80ef88f Mon Sep 17 00:00:00 2001
From: feedmeapples
Date: Mon, 24 Aug 2020 11:55:23 -0700
Subject: [PATCH 3/3] Create summary e2e coverage
---
client/routes/workflow/summary.vue | 33 +++++++++-----
cypress/integration/workflow-summary.spec.js | 48 ++++++++++++++++++++
2 files changed, 69 insertions(+), 12 deletions(-)
create mode 100644 cypress/integration/workflow-summary.spec.js
diff --git a/client/routes/workflow/summary.vue b/client/routes/workflow/summary.vue
index 705e9677..4f42b941 100644
--- a/client/routes/workflow/summary.vue
+++ b/client/routes/workflow/summary.vue
@@ -38,15 +38,15 @@
information may be missing.
-
+
Workflow Name
{{ workflow.workflowExecutionInfo.type.name }}
-
+
Started At
{{ workflowStartTime }}
-
+
Closed Time
{{ workflowCloseTime }}
@@ -56,6 +56,7 @@
wfStatus !== undefined &&
(typeof wfStatus === 'string' ? wfStatus : wfStatus.status)
"
+ data-cy="workflow-status"
>
Status
@@ -69,21 +70,25 @@
-
+
Result
-
+
Workflow Id
{{ workflowId }}
-
+
Run Id
{{ runId }}
-
+
Parent Workflow
@@ -91,7 +96,7 @@
-
+
Task Queue
-
+
History Events
{{ workflow.workflowExecutionInfo.historyLength }}
-