Skip to content

Commit

Permalink
Fix cypress tests for managing visibility of static columns in order …
Browse files Browse the repository at this point in the history
…view (#4691)
  • Loading branch information
szczecha authored and andrzejewsky committed Mar 1, 2024
1 parent 5bd4686 commit abd9a96
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-waves-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

fix cypress tests for managing visibility of static columns in order view
2 changes: 2 additions & 0 deletions cypress/e2e/orders/draftOrders.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ describe("Draft orders", () => {
.should("contain.text", "Quantity")
.should("contain.text", "Price")
.should("contain.text", "Total")
.should("contain.text", "Is gift")
.should("contain.text", "Metadata")
.should("contain.text", "Status");
// switching off all but one static columns
Expand All @@ -165,6 +166,7 @@ describe("Draft orders", () => {
cy.get(SHARED_ELEMENTS.gridStaticPriceButton).click();
cy.get(SHARED_ELEMENTS.gridStaticTotalButton).click();
cy.get(SHARED_ELEMENTS.gridStaticStatusButton).click();
cy.get(SHARED_ELEMENTS.gridStaticIsGiftButton).click();
cy.get(SHARED_ELEMENTS.gridStaticMetadataButton).click();
cy.get(SHARED_ELEMENTS.gridStaticProductButton).should(
"have.attr",
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/orders/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,15 @@ describe("Orders", () => {
.should("contain.text", "Quantity")
.should("contain.text", "Price")
.should("contain.text", "Total")
.should("contain.text", "Is gift")
.should("contain.text", "Metadata");
// switching off all but one static columns
cy.get(SHARED_ELEMENTS.gridStaticSkuButton).click();
cy.get(SHARED_ELEMENTS.gridStaticVariantNameButton).click();
cy.get(SHARED_ELEMENTS.gridStaticQuantityButton).click();
cy.get(SHARED_ELEMENTS.gridStaticPriceButton).click();
cy.get(SHARED_ELEMENTS.gridStaticTotalButton).click();
cy.get(SHARED_ELEMENTS.gridStaticIsGiftButton).click();
cy.get(SHARED_ELEMENTS.gridStaticMetadataButton).click();
cy.get(SHARED_ELEMENTS.gridStaticProductButton).should(
"have.attr",
Expand Down
1 change: 1 addition & 0 deletions cypress/elements/shared/sharedElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const SHARED_ELEMENTS = {
gridStaticPriceButton: '[data-test-id="stat-col-price"]',
gridStaticStatusButton: '[data-test-id="stat-col-status"]',
gridStaticTotalButton: '[data-test-id="stat-col-total"]',
gridStaticIsGiftButton: '[data-test-id="stat-col-isGift"]',
gridStaticProductButton: '[data-test-id="stat-col-product"]',
gridStaticMetadataButton: '[data-test-id="stat-col-metadata"]',
dynamicColumnSearchInput: '[data-test-id="search-columns"]',
Expand Down

0 comments on commit abd9a96

Please sign in to comment.