Fix tests
This commit is contained in:
parent
517d1df38f
commit
d0b357c33c
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref, watch } from "vue";
|
import { computed } from "vue";
|
||||||
import { useEntities } from "@/services/entities";
|
import { useEntities } from "@/services/entities";
|
||||||
import VueDatePicker from "@vuepic/vue-datepicker";
|
import VueDatePicker from "@vuepic/vue-datepicker";
|
||||||
import "@vuepic/vue-datepicker/dist/main.css";
|
import "@vuepic/vue-datepicker/dist/main.css";
|
||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import dayjs from "dayjs";
|
import { useUserStore } from "@/stores/user";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
|
@ -25,6 +25,7 @@ const props = defineProps<{
|
||||||
const emit = defineEmits(["update:modelValue"]);
|
const emit = defineEmits(["update:modelValue"]);
|
||||||
|
|
||||||
const { countries } = useEntities();
|
const { countries } = useEntities();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
const paymentMethods = computed(() => {
|
const paymentMethods = computed(() => {
|
||||||
return [
|
return [
|
||||||
|
|
@ -241,6 +242,9 @@ const address = computed({
|
||||||
text-input
|
text-input
|
||||||
placeholder="15.06.1982"
|
placeholder="15.06.1982"
|
||||||
start-date="1982-01-01"
|
start-date="1982-01-01"
|
||||||
|
:locale="userStore.language"
|
||||||
|
:cancel-text="$t('a.Abbrechen')"
|
||||||
|
:select-text="$t('a.Auswählen')"
|
||||||
></VueDatePicker>
|
></VueDatePicker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ describe("checkout.cy.js", () => {
|
||||||
cy.get("#city").type("Zumholz");
|
cy.get("#city").type("Zumholz");
|
||||||
|
|
||||||
cy.get("#phone").type("079 201 85 86");
|
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();
|
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.country).to.equal("CH");
|
||||||
expect(entry.api_request_data.customer.type).to.equal("P");
|
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.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.repaymentType).to.equal(3);
|
||||||
expect(entry.api_request_data.INT.riskOwner).to.equal("IJ");
|
expect(entry.api_request_data.INT.riskOwner).to.equal("IJ");
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ class UserAdmin(auth_admin.UserAdmin):
|
||||||
"postal_code",
|
"postal_code",
|
||||||
"city",
|
"city",
|
||||||
"country",
|
"country",
|
||||||
|
"birth_date",
|
||||||
|
"phone_number",
|
||||||
"invoice_address",
|
"invoice_address",
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ class DatatransServiceTest(TestCase):
|
||||||
redirect_url_error=f"{REDIRECT_URL}/error",
|
redirect_url_error=f"{REDIRECT_URL}/error",
|
||||||
redirect_url_cancel=f"{REDIRECT_URL}/cancel",
|
redirect_url_cancel=f"{REDIRECT_URL}/cancel",
|
||||||
webhook_url=f"{REDIRECT_URL}/webhook",
|
webhook_url=f"{REDIRECT_URL}/webhook",
|
||||||
|
refno2="",
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertEqual(1234567890, transaction_id)
|
self.assertEqual(1234567890, transaction_id)
|
||||||
|
|
@ -68,6 +69,7 @@ class DatatransServiceTest(TestCase):
|
||||||
redirect_url_error=f"/error",
|
redirect_url_error=f"/error",
|
||||||
redirect_url_cancel=f"/cancel",
|
redirect_url_cancel=f"/cancel",
|
||||||
webhook_url=f"/webhook",
|
webhook_url=f"/webhook",
|
||||||
|
refno2="",
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_get_payment_url(self):
|
def test_get_payment_url(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue