Skip to content

Commit

Permalink
Update tests, update card's border-radius
Browse files Browse the repository at this point in the history
  • Loading branch information
ani-kalpachka committed Jul 27, 2023
1 parent 28e2bf4 commit dab24b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions e2e/pages/web-pages/campaigns/campaigns.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export class CampaignsPage extends HomePage {
private readonly enMainCampaignsHeading = enLocalizationCampaigns.campaigns
private readonly bgSupportCauseTodayHeading = bgLocalizationCampaigns.cta['support-cause-today']
private readonly enSupportCauseTodayHeading = enLocalizationCampaigns.cta['support-cause-today']
private readonly bgSupportNowActionButtonText = bgLocalizationCampaigns.cta['support-now']
private readonly enSupportNowActionButtonText = enLocalizationCampaigns.cta['support-now']
private readonly bgSupportNowActionButtonText = bgLocalizationCampaigns.cta['support']
private readonly enSupportNowActionButtonText = enLocalizationCampaigns.cta['support']

async checkPageUrlByRegExp(urlRegExpAsString?: string, timeoutParam = 10000): Promise<void> {
await this.page.waitForTimeout(1000)
Expand Down
8 changes: 5 additions & 3 deletions src/components/client/campaigns/CampaignCard/CampaignCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation, i18n } from 'next-i18next'
import { CampaignResponse } from 'gql/campaigns'

import { CardMedia } from '@mui/material'
import { CardActionArea, CardMedia } from '@mui/material'

import { routes } from 'common/routes'
import theme from 'common/theme'
Expand Down Expand Up @@ -43,7 +43,9 @@ export default function ActiveCampaignCard({ campaign, index }: Props) {

return (
<Root data-testid={`completed-campaign-${index}`}>
<Link href={routes.campaigns.viewCampaignBySlug(slug)} sx={{ position: 'relative' }}>
<CardActionArea
href={routes.campaigns.viewCampaignBySlug(slug)}
sx={{ position: 'relative' }}>
<CardMedia
component="img"
height="100%"
Expand Down Expand Up @@ -83,7 +85,7 @@ export default function ActiveCampaignCard({ campaign, index }: Props) {
<CampaignProgress campaignId={id} raised={reached} target={target} />
<CampaignTitle>{title}</CampaignTitle>
</StyledContent>
</Link>
</CardActionArea>
<StyledCardActions disableSpacing>
<DonateButton
href={routes.campaigns.oneTimeDonation(slug)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/client/campaigns/CampaignsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function CampaignsList({ campaignToShow }: Props) {
</Button>
</Grid>
)}
<Grid>
<Grid item xs={12} textAlign="center">
<Box sx={{ my: 10 }}>
{mobile ? (
<Image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const Root = styled(Card)(() => ({
alignItems: 'initial',
boxShadow: 'none',
position: 'relative',
borderRadius: theme.spacing(0.37),

'&:hover': {
filter: 'grayscale(15%)',
Expand Down

0 comments on commit dab24b6

Please sign in to comment.