Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1da464a
commit 1575971
Showing
59 changed files
with
2,254 additions
and
748 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"count": "15" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,81 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('Bulk Termination', () => { | ||
it("disallows bulk actions for cluster that doesn't have elasticsearch enabled", () => { | ||
cy.interceptApi(); | ||
describe('Batch and Bulk Workflow Actions', () => { | ||
describe('when advanced visibility is disabled', () => { | ||
it('disallows bulk and batch actions', () => { | ||
cy.interceptApi(); | ||
|
||
cy.visit('/namespaces/default/workflows'); | ||
cy.visit('/namespaces/default/workflows'); | ||
|
||
cy.wait('@workflows-api'); | ||
cy.wait('@cluster-api'); | ||
cy.wait('@cluster-api'); | ||
cy.wait('@workflows-api'); | ||
|
||
cy.get('#workflows-table-with-bulk-actions').should('not.exist'); | ||
cy.get('#workflows-table-with-bulk-actions').should('not.exist'); | ||
}); | ||
}); | ||
|
||
it('allows running workflows to be terminated for cluster that does have elasticsearch enabled', () => { | ||
cy.interceptApi(); | ||
cy.intercept(Cypress.env('VITE_API_HOST') + '/api/v1/cluster*', { | ||
fixture: 'cluster-with-elasticsearch.json', | ||
}).as('cluster-api-elasticsearch'); | ||
describe('when advanced visibility is enabled', () => { | ||
beforeEach(() => { | ||
cy.interceptApi(); | ||
|
||
cy.visit('/namespaces/default/workflows'); | ||
cy.intercept(Cypress.env('VITE_API_HOST') + '/api/v1/cluster*', { | ||
fixture: 'cluster-with-elasticsearch.json', | ||
}).as('cluster-api-elasticsearch'); | ||
|
||
cy.wait('@workflows-api'); | ||
cy.wait('@cluster-api-elasticsearch'); | ||
cy.visit('/namespaces/default/workflows'); | ||
|
||
cy.get('#workflows-table-with-bulk-actions').should('exist'); | ||
cy.wait('@cluster-api-elasticsearch'); | ||
cy.wait('@workflows-api'); | ||
}); | ||
|
||
cy.get('th.selectable > label.checkbox > span.label').click(); | ||
cy.get('[data-cy="bulk-terminate-button"]').click(); | ||
cy.get('#bulk-terminate-reason').type('Sarah Connor'); | ||
cy.get('div.modal button.destructive').click(); | ||
cy.get('#batch-terminate-success-toast'); | ||
it('allows running workflows to be terminated by ID', () => { | ||
cy.get('#workflows-table-with-bulk-actions').should('exist'); | ||
|
||
cy.get('#select-visible-workflows').click({ force: true }); | ||
cy.get('[data-cy="bulk-terminate-button"]').click(); | ||
cy.get('#bulk-action-reason').type('Sarah Connor'); | ||
cy.get('div.modal button.destructive').click(); | ||
cy.get('#batch-terminate-success-toast'); | ||
}); | ||
|
||
it('allows running workflows to be terminated by a query', () => { | ||
cy.get('#workflows-table-with-bulk-actions').should('exist'); | ||
|
||
cy.get('#select-visible-workflows').click({ force: true }); | ||
cy.get('[data-cy="select-all-workflows"]').click(); | ||
cy.get('[data-cy="bulk-terminate-button"]').click(); | ||
cy.get('[data-cy="batch-action-workflows-query"]').should( | ||
'have.text', | ||
'ExecutionStatus="Running"', | ||
); | ||
cy.get('#bulk-action-reason').type('Sarah Connor'); | ||
cy.get('div.modal button.destructive').click(); | ||
cy.get('#batch-terminate-success-toast'); | ||
}); | ||
|
||
it('allows running workflows to be cancelled by ID', () => { | ||
cy.get('#workflows-table-with-bulk-actions').should('exist'); | ||
|
||
cy.get('#select-visible-workflows').click({ force: true }); | ||
cy.get('[data-cy="bulk-cancel-button"]').click(); | ||
cy.get('#bulk-action-reason').type('Sarah Connor'); | ||
cy.get('div.modal button.destructive').click(); | ||
cy.get('#batch-cancel-success-toast'); | ||
}); | ||
|
||
it('allows running workflows to be cancelled by a query', () => { | ||
cy.get('#workflows-table-with-bulk-actions').should('exist'); | ||
|
||
cy.get('#select-visible-workflows').click({ force: true }); | ||
cy.get('[data-cy="select-all-workflows"]').click(); | ||
cy.get('[data-cy="bulk-cancel-button"]').click(); | ||
cy.get('[data-cy="batch-action-workflows-query"]').should( | ||
'have.text', | ||
'ExecutionStatus="Running"', | ||
); | ||
cy.get('#bulk-action-reason').type('Sarah Connor'); | ||
cy.get('div.modal button.destructive').click(); | ||
cy.get('#batch-cancel-success-toast'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.