Update UI, improve E2E tests and modify trial period configuration
The code changes incorporate UI updates for better usability and user experience. E2E test scripts(in `user-billing.spec.ts` and `team-billing.spec.ts`) were also updated for improved efficiency and accuracy, primarily replacing 'Active' status check with 'Trial'. Changes have been made in the trialDays configuration, with the term 'trialPeriod' now replaced by 'trialDays' across different components. Notably, a new error handling case is included in `lemon-squeezy-billing-strategy.service.ts` for failed subscription cancellation attempts.
This commit is contained in:
@@ -191,7 +191,12 @@ export function AccountSelector({
|
||||
data-test={'account-selector-team'}
|
||||
data-name={account.label}
|
||||
data-slug={account.value}
|
||||
className={'group flex space-x-2'}
|
||||
className={cn(
|
||||
'group flex justify-between transition-colors',
|
||||
{
|
||||
['bg-muted']: value === account.value,
|
||||
},
|
||||
)}
|
||||
key={account.value}
|
||||
value={account.value ?? ''}
|
||||
onSelect={(currentValue) => {
|
||||
@@ -203,23 +208,28 @@ export function AccountSelector({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Avatar
|
||||
className={cn('h-6 w-6 border border-transparent', {
|
||||
['border-border']: value === account.value,
|
||||
['group-hover:border-border ']:
|
||||
value !== account.value,
|
||||
})}
|
||||
>
|
||||
<AvatarImage src={account.image ?? undefined} />
|
||||
<div className={'flex items-center'}>
|
||||
<Avatar
|
||||
className={cn(
|
||||
'mr-2 h-6 w-6 border border-transparent',
|
||||
{
|
||||
['border-border']: value === account.value,
|
||||
['group-hover:border-border ']:
|
||||
value !== account.value,
|
||||
},
|
||||
)}
|
||||
>
|
||||
<AvatarImage src={account.image ?? undefined} />
|
||||
|
||||
<AvatarFallback>
|
||||
{account.label ? account.label[0] : ''}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<AvatarFallback>
|
||||
{account.label ? account.label[0] : ''}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
|
||||
<span className={'mr-2 max-w-[165px] truncate'}>
|
||||
{account.label}
|
||||
</span>
|
||||
<span className={'mr-2 max-w-[165px] truncate'}>
|
||||
{account.label}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<Icon item={account.value ?? ''} />
|
||||
</CommandItem>
|
||||
|
||||
Reference in New Issue
Block a user