Skip to content

16j #167

Open
Open
16j#167
@K-ESWAR

Description

@K-ESWAR

can sommeonew explain why i get the error [ cannot read properties of null(reading 'innerText')]
should i call the renderpaymentSummary() inside this testcase?

it('update delivery option', () => {

document.querySelector(`.js-delivery-option-${productId1}-3`).click();

expect(document.querySelector(`.js-delivery-option-input-${productId1}-3`).checked).toEqual(true);

expect(cart.length).toEqual(2);
expect(cart[0].productId).toEqual(productId1);
expect(cart[0].deliveryOptionId).toEqual('3');

const a=document.querySelector('.js-payment-summary-shipping');
expect((a).innerText).toEqual('$14.98');

const b=document.querySelector('.js-payment-summary-total');
expect((b).innerText).toEqual('$63.50');

});

test suite: renderOrderSummary>update delivery option
TypeError: Cannot read properties of null (reading 'innerText')
at UserContext. (http://127.0.0.1:5500/tests/checkout/orderSummaryTest.js:96:16)
at

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions