feat: add the create newsletter recipient request#648
Conversation
commit: |
7eda74e to
cf5e02a
Compare
f224c4f to
017ed00
Compare
38ef4df to
318a28e
Compare
| this.promotionLineItems = this.confirmProductTable.locator(".line-item-promotion"); | ||
| } | ||
|
|
||
| getLineItemByProductName(lineItem: Locator, productName: string): Record<string, Locator> { |
There was a problem hiding this comment.
Why you have to provide a lineItem locator here? Could you not just take a line items and filter down to the specific one with .filter() like here
There was a problem hiding this comment.
As each lineItem can be different types and will have many same assertion elements inside so i tried to make the code reusable but i updated the code based on your suggestion to align with existing code and easy to read
| } | ||
|
|
||
| async getLineItemByPromotionName(name: string): Promise<Record<string, Locator>> { | ||
| let promotionItem = this.page.locator(".line-item-promotion", { hasText: name }); |
There was a problem hiding this comment.
why you use let as keyword here and not const?
| * | ||
| * @param customer - The customer whose email and profile data will be used for the newsletter recipient. | ||
| */ | ||
| async createNewsletterRecipient(customer: Customer): Promise<NewsletterRecipient> { |
There was a problem hiding this comment.
I miss the overrides here so that we can modify the date etc. (see other create functions)
There was a problem hiding this comment.
the overrides parameter is now added to createNewsletterRecipient func similar to other func
56cc2cb to
9688af6
Compare
Summary
Test Scenario Detail
Related to test
CheckoutWithPromotionRule.spec.tsin PR 17408