-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix cypress tests with new ui changes
- Loading branch information
1 parent
1ab9848
commit a99d336
Showing
10 changed files
with
518 additions
and
443 deletions.
There are no files selected for viewing
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,39 +1,51 @@ | ||
describe('Tests about copying', function() { | ||
describe("Tests about copying", function () { | ||
beforeEach(() => { | ||
cy.clearDebugStore(); | ||
}) | ||
}); | ||
|
||
afterEach(() => { | ||
cy.get('li#testTab').click(); | ||
cy.get('#SelectAllButton').click(); | ||
cy.get('.row #DeleteSelectedButton').click(); | ||
cy.get('#confirmDeletion').click(); | ||
cy.get('#debugTab').click(); | ||
cy.get("li#testTab").click(); | ||
cy.get("#SelectAllButton").click(); | ||
cy.get(".row #DeleteSelectedButton").click(); | ||
cy.get("#confirmDeletion").click(); | ||
cy.get("#debugTab").click(); | ||
}); | ||
|
||
it('Copy report to test tab', () => { | ||
cy.visit(''); | ||
cy.get('#testTab').click(); | ||
cy.get('#metadataTable tbody', {timeout: 10000}).find('tr').should('not.exist'); | ||
it("Copy report to test tab", () => { | ||
cy.visit(""); | ||
cy.get("#testTab").click(); | ||
cy.get("#metadataTable tbody", { timeout: 10000 }) | ||
.find("tr") | ||
.should("not.exist"); | ||
cy.createReport(); | ||
cy.get('#debugTab').click(); | ||
cy.get('#metadataTable tbody', {timeout: 10000}).find('tr').should('not.exist'); | ||
cy.get('.row #RefreshButton').click(); | ||
cy.get('#metadataTable tbody').find('tr').should('have.length', 1); | ||
cy.get('button[id="SelectAllReportsButton"]').click(); | ||
cy.get("#debugTab").click(); | ||
cy.get("#metadataTable tbody", { timeout: 10000 }) | ||
.find("tr") | ||
.should("not.exist"); | ||
cy.get(".row #RefreshButton").click(); | ||
cy.get("#metadataTable tbody").find("tr").should("have.length", 1); | ||
cy.get("[data-cy-select-all-reports]").click(); | ||
cy.get('button[id="OpenSelectedReportsButton"]').click(); | ||
cy.get('#debug-tree .jqx-tree-dropdown-root > li').should('have.length', 1); | ||
cy.get('button#CopyButton').click(); | ||
cy.get('li#testTab').click(); | ||
cy.get("#debug-tree .jqx-tree-dropdown-root > li").should("have.length", 1); | ||
cy.get("button#CopyButton").click(); | ||
cy.get("li#testTab").click(); | ||
// We test that the user does not have to refresh here. | ||
cy.get('tbody#testReports').find('tr').should('have.length', 1); | ||
cy.get('tbody#testReports').find('tr').contains('/Simple report').should('have.length', 1); | ||
cy.get('#debugTab').click(); | ||
cy.get('#metadataTable tbody', {timeout: 10000}).find('tr').should('have.length', 1); | ||
cy.get('#debug-tree .jqx-tree-dropdown-root > li').should('have.length', 1); | ||
cy.get('li#testTab').click(); | ||
cy.get("tbody#testReports").find("tr").should("have.length", 1); | ||
cy.get("tbody#testReports") | ||
.find("tr") | ||
.contains("/Simple report") | ||
.should("have.length", 1); | ||
cy.get("#debugTab").click(); | ||
cy.get("#metadataTable tbody", { timeout: 10000 }) | ||
.find("tr") | ||
.should("have.length", 1); | ||
cy.get("#debug-tree .jqx-tree-dropdown-root > li").should("have.length", 1); | ||
cy.get("li#testTab").click(); | ||
// Do not refresh. The test tab should have saved its state. | ||
cy.get('tbody#testReports').find('tr').should('have.length', 1); | ||
cy.get('tbody#testReports').find('tr').contains('/Simple report').should('have.length', 1); | ||
cy.get("tbody#testReports").find("tr").should("have.length", 1); | ||
cy.get("tbody#testReports") | ||
.find("tr") | ||
.contains("/Simple report") | ||
.should("have.length", 1); | ||
}); | ||
}); |
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.