Refactor billing process in e2e tests
Code for billing process was refactored in end-to-end tests for clean code and better structure. In the described tests, related codes and classes have been moved to a new class named BillingPageObject. All corresponding calls were updated accordingly.
This commit is contained in:
@@ -45,7 +45,7 @@ export function CurrentPlanBadge(
|
||||
}
|
||||
|
||||
return (
|
||||
<Badge variant={variant}>
|
||||
<Badge data-test={'current-plan-card-status-badge'} variant={variant}>
|
||||
<Trans i18nKey={text} />
|
||||
</Badge>
|
||||
);
|
||||
|
||||
@@ -73,7 +73,9 @@ export function CurrentSubscriptionCard({
|
||||
}
|
||||
/>
|
||||
|
||||
<span>{product.name}</span>
|
||||
<span data-test={'current-plan-card-product-name'}>
|
||||
{product.name}
|
||||
</span>
|
||||
|
||||
<CurrentPlanBadge status={subscription.status} />
|
||||
</div>
|
||||
@@ -84,7 +86,7 @@ export function CurrentSubscriptionCard({
|
||||
(e.g. trial ending soon, subscription canceled, etc.)
|
||||
*/}
|
||||
<If condition={!subscription.active}>
|
||||
<div>
|
||||
<div data-test={'current-plan-card-status-alert'}>
|
||||
<CurrentPlanAlert status={subscription.status} />
|
||||
</div>
|
||||
</If>
|
||||
|
||||
Reference in New Issue
Block a user