Skip to content

Commit

Permalink
FRW test
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitriyTsemma committed Nov 27, 2024
1 parent b5c0be2 commit cff75e4
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,13 @@ export class SuiteCartRepository implements CartRepository {
cy.get('[data-qa="product-quick-add-form-submit-button"]');
findCartItemRemovalForm = (sku: string): Cypress.Chainable => {
return cy.get('[action]').filter((index, element) => {
if (Cypress.env('isDynamicStoreEnabled')) {
const regex = new RegExp(`^/\\w+/\\w+/cart/async/remove/${sku}/\\w+`);
return regex.test(element.getAttribute('action') ?? '');
}
const regex = new RegExp(`^/\\w+/cart/async/remove/${sku}/\\w+`);
return regex.test(element.getAttribute('action') ?? '');
});
};
findCartItemRemovalSubmit = (sku: string): Cypress.Chainable => this.findCartItemRemovalForm(sku).find('button');
findCartItemChangeQuantityForm = (sku: string): Cypress.Chainable => {
return cy.get('[action]').filter((index, element) => {
if (Cypress.env('isDynamicStoreEnabled')) {
const regex = new RegExp(`^/\\w+/\\w+/cart/async/change-quantity/${sku}$`);
return regex.test(element.getAttribute('action') ?? '');
}
const regex = new RegExp(`^/\\w+/cart/async/change-quantity/${sku}$`);
return regex.test(element.getAttribute('action') ?? '');
});
Expand Down

0 comments on commit cff75e4

Please sign in to comment.