Fix tests

This commit is contained in:
Daniel Egger 2024-07-02 15:36:27 +02:00
parent 517d1df38f
commit d0b357c33c
4 changed files with 12 additions and 3 deletions

View File

@ -1,10 +1,10 @@
<script setup lang="ts">
import { computed, ref, watch } from "vue";
import { computed } from "vue";
import { useEntities } from "@/services/entities";
import VueDatePicker from "@vuepic/vue-datepicker";
import "@vuepic/vue-datepicker/dist/main.css";
import { t } from "i18next";
import dayjs from "dayjs";
import { useUserStore } from "@/stores/user";
const props = defineProps<{
modelValue: {
@ -25,6 +25,7 @@ const props = defineProps<{
const emit = defineEmits(["update:modelValue"]);
const { countries } = useEntities();
const userStore = useUserStore();
const paymentMethods = computed(() => {
return [
@ -241,6 +242,9 @@ const address = computed({
text-input
placeholder="15.06.1982"
start-date="1982-01-01"
:locale="userStore.language"
:cancel-text="$t('a.Abbrechen')"
:select-text="$t('a.Auswählen')"
></VueDatePicker>
</div>
</div>

View File

@ -128,7 +128,7 @@ describe("checkout.cy.js", () => {
cy.get("#city").type("Zumholz");
cy.get("#phone").type("079 201 85 86");
cy.get("#birth-date").type("1982-06-09");
cy.get('[data-test="dp-input"]').type("09.06.1982{enter}");
cy.get('[data-cy="continue-pay"]').click();
@ -149,6 +149,7 @@ describe("checkout.cy.js", () => {
expect(entry.api_request_data.customer.country).to.equal("CH");
expect(entry.api_request_data.customer.type).to.equal("P");
expect(entry.api_request_data.customer.phone).to.equal("+41792018586");
expect(entry.api_request_data.customer.birthDate).to.equal("1982-06-09");
expect(entry.api_request_data.INT.repaymentType).to.equal(3);
expect(entry.api_request_data.INT.riskOwner).to.equal("IJ");

View File

@ -60,6 +60,8 @@ class UserAdmin(auth_admin.UserAdmin):
"postal_code",
"city",
"country",
"birth_date",
"phone_number",
"invoice_address",
)
},

View File

@ -43,6 +43,7 @@ class DatatransServiceTest(TestCase):
redirect_url_error=f"{REDIRECT_URL}/error",
redirect_url_cancel=f"{REDIRECT_URL}/cancel",
webhook_url=f"{REDIRECT_URL}/webhook",
refno2="",
)
self.assertEqual(1234567890, transaction_id)
@ -68,6 +69,7 @@ class DatatransServiceTest(TestCase):
redirect_url_error=f"/error",
redirect_url_cancel=f"/cancel",
webhook_url=f"/webhook",
refno2="",
)
def test_get_payment_url(self):