-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from mollie/feature/MOL-439/PICT-253_resolved-…
…develop Feature/mol 439/pict 253 resolved develop
- Loading branch information
Showing
23 changed files
with
1,074 additions
and
101 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/// <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 welcome.cy.ts', () => { | ||
it('should render method details page', () => { | ||
const LOCALE = Cypress.env('LOCALE'); | ||
const paymentMethods = [ | ||
'PayPal', | ||
'iDEAL Pay in 3 instalments, 0% interest', | ||
'iDEAL', | ||
'Bancontact', | ||
'Blik', | ||
]; | ||
|
||
cy.findByText(paymentMethods[0]).click(); | ||
cy.url().should('contain', 'general'); | ||
|
||
cy.findByTestId('status-select').should('exist'); | ||
|
||
cy.findByTestId(`name-input-${LOCALE}`).should('exist'); | ||
cy.findByTestId(`description-input-${LOCALE}`).should('exist'); | ||
cy.findByTestId(`display-order-input`).should('exist'); | ||
}); | ||
|
||
it('should update display order successfully', () => { | ||
const paymentMethodIds = ['paypal', 'ideal', 'bancontact']; | ||
|
||
cy.findByTestId(`display-order-column-${paymentMethodIds[0]}`).click(); | ||
cy.url().should('contain', 'general'); | ||
|
||
cy.findByTestId(`display-order-input`).should('exist'); | ||
cy.findByTestId(`display-order-input`).clear(); | ||
cy.findByTestId(`display-order-input`).type('20'); | ||
cy.findByTestId(`save-button`).click(); | ||
cy.findByLabelText('Go back').click(); | ||
cy.findByTestId(`display-order-column-${paymentMethodIds[0]}`).should( | ||
'have.text', | ||
20 | ||
); | ||
}); | ||
}); |
Oops, something went wrong.