Skip to content

Commit

Permalink
add workaround for csv downloading link (#783)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Brugarolas <[email protected]>
  • Loading branch information
abrugaro authored Oct 31, 2023
1 parent 776a8d8 commit 1b52e61
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/
/// <reference types="cypress" />

import { cleanupDownloads, click, login, openManageImportsPage } from "../../../../../utils/utils";
import { cleanupDownloads, login, openManageImportsPage } from "../../../../../utils/utils";
import { kebabMenuItem } from "../../../../views/applicationinventory.view";
import { Application } from "../../../../models/migration/applicationinventory/application";
import { manageImportsActionsButton } from "../../../../views/common.view";
Expand All @@ -27,10 +27,17 @@ describe(["@tier2"], "Manage imports tests", function () {
openManageImportsPage();
});

it("Download CSV template", function () {
it("Bug MTA-1592: Download CSV template", function () {
cy.get(manageImportsActionsButton).eq(0).click({ force: true });
cy.get(kebabMenuItem)
.contains("Download CSV template")
.parent()
.parent()
.then(($a) => {
$a.attr("download", ""); // TODO: remove this workaround once the bug is fixed
})
.click();
cy.wait(2000);
cy.get(kebabMenuItem).contains("Download CSV template").click();
cy.readFile("cypress/downloads/template_application_import.csv").should(
"contain",
"Customers"
Expand Down

0 comments on commit 1b52e61

Please sign in to comment.