Skip to content

Commit

Permalink
NTR: fix smart contact form
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Mar 14, 2024
1 parent 042b5a1 commit 03be2b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,31 @@
</sw-alert>

<sw-container columns="1fr 1fr" gap="16px">
<sw-text-field data-testid="name" v-model="name"
<sw-text-field v-model="name"
class="input-name"
:label="$tc('mollie-payments.config.support.form.name')"
:placeholder="userName"
size="medium">
</sw-text-field>
<sw-email-field data-testid="email" v-model="email"
<sw-email-field v-model="email"
class="input-email"
:label="$tc('mollie-payments.config.support.form.email')"
:placeholder="user.email"
size="medium">
</sw-email-field>
</sw-container>
<sw-single-select data-testid="recepient" v-model="recipientLocale"
<sw-single-select v-model="recipientLocale"
class="input-recepient"
:label="$tc('mollie-payments.config.support.form.recipient')"
:options="recipientOptions"
size="medium">
</sw-single-select>
<sw-text-field data-testid="subject" v-model="subject"
<sw-text-field v-model="subject"
class="input-subject"
:label="$tc('mollie-payments.config.support.form.subject')"
size="medium">
</sw-text-field>
<sw-text-editor data-testid="message" v-model="message"
<sw-text-editor v-model="message" class="input-message"
:label="$tc('mollie-payments.config.support.form.message')">
</sw-text-editor>
</sw-container>
Expand Down
10 changes: 5 additions & 5 deletions tests/Cypress/cypress/e2e/admin/plugin-config.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ context("Plugin Config", () => {
cy.get('.sw-button-process').should('be.disabled');

// now fill in our data
cy.get('input[data-testid="name"]').type('John');
cy.get('[data-testid="email"] input').type('[email protected]');
cy.get('input[data-testid="subject"]').type('Cypress Test Request');
cy.get('[data-testid="message"] [contenteditable="true"]').type('This is an automated request by Cypress and should not be sent.');
cy.get('.input-name input').type('John');
cy.get('.input-email input').type('[email protected]');
cy.get('.input-subject input').type('Cypress Test Request');
cy.get('.input-message [contenteditable="true"]').type('This is an automated request by Cypress and should not be sent.');

// now click somewhere else
cy.get('input[data-testid="name"]').click();
cy.get('.input-name input').click();

// the send button should be enabled now
cy.get('.sw-button-process').should('not.be.disabled');
Expand Down

0 comments on commit 03be2b3

Please sign in to comment.