Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC-34716: Cart Reorder + Order Amendment features. #27

Merged
merged 9 commits into from
Dec 4, 2024

Conversation

dmiseev
Copy link
Contributor

@dmiseev dmiseev commented Nov 22, 2024

PR Description

Add a meaningful description here that will let us know what you want to fix with this PR or what functionality you want to add.

Steps before you submit a PR

  • Please add tests for the code you add if it's possible.
  • Please check out our contribution guide: https://docs.spryker.com/docs/dg/dev/code-contribution-guide.html
  • Add a contribution-license-agreement.txt file with the following content:
    I hereby agree to Spryker\'s Contribution License Agreement in https://github.com/spryker/commerce-k6-performance-tests/blob/HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH/CONTRIBUTING.md.

This is a mandatory step to make sure you are aware of the license agreement and agree to it. HASH_OF_COMMIT_YOU_ARE_BASING_YOUR_BRANCH_FROM_MASTER_BRANCH is a hash of the commit you are basing your branch from the master branch. You can take it from commits list of master branch before you submit a PR.

Checklist

  • I agree with the Code Contribution License Agreement in CONTRIBUTING.md

@dmiseev dmiseev self-assigned this Nov 22, 2024
}
];

// Generate products dynamically
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: generate products, customers, etc would be better to move to a separate methods just for readability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be reworked in next phase. For now I would keep it as it is.

}
}

function handleSummaryTesting(data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor:

Suggested change
function handleSummaryTesting(data) {
function _handleSummaryTesting(data) {

As I understand it is used in this class only

_getPaymentProviderName() {
return 'DummyPayment';
_getPaymentProviderName(isMpPaymentProvider = true) {
return isMpPaymentProvider ? 'DummyPayment' : 'DummyPayment';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same values

Comment on lines +37 to +42
const customerIndex = (__VU - 1) % data.length;
const { customerEmail, quoteIds } = data[customerIndex];
const quoteIndex = __ITER % quoteIds.length;

// Place an order
const checkoutResponseJson = sharedCheckoutScenario.haveOrder(customerEmail, quoteIds[quoteIndex], false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is repeated everywhere, does it make sense to move to a helper?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it would be a helper in AbstractScenario, this class will be a rich model with N helpers, I would avoid it. Instead of helper, we could reuse scenario methods.

@dmiseev dmiseev merged commit 5f83a83 into master Dec 4, 2024
1 check passed
@dmiseev dmiseev deleted the feature/cc-34716-cart-reorder-and-order-amendment branch December 4, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants