Skip to content

Commit

Permalink
Merge pull request #96 from mollie/feature/MOL-446
Browse files Browse the repository at this point in the history
MOL-446/MOL-509: add Icon tab for controlling image url
  • Loading branch information
tdang1-shopmacher authored Nov 18, 2024
2 parents 403f366 + 3c43e13 commit e22c49b
Show file tree
Hide file tree
Showing 25 changed files with 208 additions and 983 deletions.
36 changes: 36 additions & 0 deletions application/cypress/e2e/method-details-icon.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/// <reference types="cypress" />
/// <reference types="@testing-library/cypress" />
/// <reference types="@commercetools-frontend/cypress" />

import {
entryPointUriPath,
APPLICATION_BASE_ROUTE,
} from '../support/constants';

beforeEach(() => {
cy.loginToMerchantCenter({
entryPointUriPath,
initialRoute: APPLICATION_BASE_ROUTE,
});

cy.fixture('forward-to').then((response) => {
cy.intercept('GET', '/proxy/forward-to', {
statusCode: 200,
body: response,
});
});
});

describe('Test method details - Icon tab', () => {
it('should be fully functional', () => {
const paymentMethod = 'PayPal';

cy.findByText(paymentMethod).click();

cy.findByRole('tab', { name: 'Icon' }).click();
cy.url().should('contain', 'icon');

cy.findByTestId('image-url-input').should('be.visible');
cy.findByTestId('image-preview').should('be.visible');
});
});
2 changes: 1 addition & 1 deletion application/cypress/e2e/method-details.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Test welcome.cy.ts', () => {
});

it('should update display order successfully', () => {
const paymentMethodIds = ['paypal', 'ideal', 'bancontact'];
const paymentMethodIds = ['paypal'];

cy.findByTestId(`display-order-column-${paymentMethodIds[0]}`).click();
cy.url().should('contain', 'general');
Expand Down
2 changes: 1 addition & 1 deletion application/cypress/e2e/welcome.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ describe('Test welcome.cy.ts', () => {

const paymentMethods = [
'PayPal',
'iDEAL Pay in 3 instalments, 0% interest',
'iDEAL',
'Bancontact',
'Blik',
'Bank transfer',
];

const headers = ['Payment method', 'Active', 'Icon', 'Display order'];
Expand Down
108 changes: 0 additions & 108 deletions application/src/components/channel-details/channel-details-form.tsx

This file was deleted.

Loading

0 comments on commit e22c49b

Please sign in to comment.