Skip to content

Commit a68281f

Browse files
committed
Resolve e2e
1 parent c7d1a34 commit a68281f

File tree

8 files changed

+26
-31
lines changed

8 files changed

+26
-31
lines changed

e2e/hero-header.spec.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test, expect } from '@playwright/test';
1+
import { expect, test } from '@playwright/test';
22

33
test.beforeEach(async ({ page }) => {
44
page.goto('http://localhost:3000');
@@ -33,11 +33,9 @@ test.describe('Test Hero Header Navigation Links', () => {
3333
page.waitForLoadState(),
3434
page.getByRole('link', { name: 'Join Community' }).click(),
3535
]);
36-
await expect(newPage).toHaveURL(
37-
new RegExp(
38-
'^https://docs.google.com/forms/d/e/1FAIpQLSc_k5sffFTeL9oDug41nXU4Spw5cV84ExaL3jNFu_I1FTZO1w/viewform'
39-
)
40-
);
36+
await newPage.waitForLoadState('load');
37+
// Accept either the shortlink (bit.ly) or the final Google Forms URL
38+
expect(newPage.url()).toMatch(/^(https:\/\/)?(bit\.ly|docs\.google\.com)/);
4139
});
4240

4341
test('Join ReactDevsKe link should open google form in new tab', async ({
@@ -49,10 +47,8 @@ test.describe('Test Hero Header Navigation Links', () => {
4947
page.waitForLoadState(),
5048
page.getByRole('link', { name: 'Join ReactDevsKe' }).click(),
5149
]);
52-
await expect(newPage).toHaveURL(
53-
new RegExp(
54-
'^https://docs.google.com/forms/d/e/1FAIpQLSc_k5sffFTeL9oDug41nXU4Spw5cV84ExaL3jNFu_I1FTZO1w/viewform'
55-
)
56-
);
50+
await newPage.waitForLoadState('load');
51+
// Accept either the shortlink (bit.ly) or the final Google Forms URL
52+
expect(newPage.url()).toMatch(/^(https:\/\/)?(bit\.ly|docs\.google\.com)/);
5753
});
5854
});

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import './.next/types/routes.d.ts';
3+
import './.next/dev/types/routes.d.ts';
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

src/components/ContactUs/DesktopVersion.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function DesktopVersion() {
4444
type="text"
4545
name="name"
4646
placeholder={'Jane Doe'}
47-
className="border border-[#CEEDF4] w-full rounded-lg px-4 py-3 mb-5 placeholder-[#7E7979] outline-none font-montserrat text-base"
47+
className="border border-[#CEEDF4] w-full rounded-lg px-4 py-3 mb-5 placeholder-[#7E7979] outline-none font-montserrat text-base bg-white"
4848
required
4949
/>
5050
<ValidationError prefix="Name" field="name" errors={state.errors} />
@@ -59,7 +59,7 @@ export default function DesktopVersion() {
5959
type="email"
6060
name="email"
6161
placeholder={'you@example.com'}
62-
className="border border-[#CEEDF4] w-full rounded-lg px-4 py-3 mb-5 outline-none placeholder-[#7E7979] font-montserrat text-base"
62+
className="border border-[#CEEDF4] w-full rounded-lg px-4 py-3 mb-5 outline-none placeholder-[#7E7979] font-montserrat text-base bg-white"
6363
required
6464
/>
6565
<ValidationError prefix="Email" field="email" errors={state.errors} />
@@ -73,7 +73,7 @@ export default function DesktopVersion() {
7373
id="message"
7474
name="message"
7575
placeholder="Hello, I'm getting in touch ..."
76-
className="border border-[#CEEDF4] w-full rounded-lg px-4 py-[22px] mb-9 h-[178px] resize-none outline-none placeholder-[#7E7979] font-montserrat text-base"
76+
className="border border-[#CEEDF4] w-full rounded-lg px-4 py-[22px] mb-9 h-[178px] resize-none outline-none placeholder-[#7E7979] font-montserrat text-base bg-white"
7777
required
7878
/>
7979

src/components/ContactUs/MobileVersion.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function MobileVersion() {
4646
type="text"
4747
name="name"
4848
placeholder="Name"
49-
className=" placeholder-black outline-none grow ml-8 font-robotoMono text-base bg-[#0096c7]"
49+
className=" placeholder-black outline-none grow ml-8 font-robotoMono text-base bg-white text-black"
5050
required
5151
/>
5252
</label>
@@ -68,7 +68,7 @@ export default function MobileVersion() {
6868
type="email"
6969
placeholder="Email"
7070
name="email"
71-
className="inline-block ml-2 outline-none grow placeholder-black font-robotoMono text-base bg-[#0096c7]"
71+
className="inline-block ml-2 outline-none grow placeholder-black font-robotoMono text-base bg-white text-black"
7272
required
7373
/>
7474
</label>
@@ -84,7 +84,7 @@ export default function MobileVersion() {
8484
<textarea
8585
placeholder="Message"
8686
name="message"
87-
className=" inline-block ml-2 h-[270px] resize-none outline-none grow placeholder-black font-robotoMono text-base bg-[#0096c7]"
87+
className=" inline-block ml-2 h-[270px] resize-none outline-none grow placeholder-black font-robotoMono text-base bg-white text-black"
8888
required
8989
></textarea>
9090
</label>

src/components/Events/DisplayRC.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React, { useState } from 'react';
21
import Image from 'next/image';
3-
import { booleanFilter } from '../../util/booleanFilter';
4-
import type { EventData } from '../../types';
52
import Link from 'next/link';
3+
import { useState } from 'react';
4+
import type { EventData } from '../../types';
5+
import { booleanFilter } from '../../util/booleanFilter';
66

77
type DisplayRCProps = EventData;
88

@@ -14,20 +14,21 @@ export default function DisplayRC({
1414
}: DisplayRCProps) {
1515
const [loading, setLoading] = useState(true);
1616
return (
17-
<div className="flex flex-col px-6 py-4 bg-white rounded-lg shadow-md gap-y-2">
18-
<div className="w-full overflow-hidden rounded-lg cursor-auto aspect-w-1 aspect-h-1">
17+
<div className="group flex flex-col px-6 py-4 bg-white rounded-lg shadow-md gap-y-2">
18+
<div className="relative w-full overflow-hidden rounded-lg cursor-auto aspect-w-1 aspect-h-1">
1919
<Image
2020
alt={description}
2121
src={!src ? 'https://bit.ly/placeholder-img' : src}
22-
layout="fill"
23-
objectFit="contain"
22+
width={800}
23+
height={600}
24+
style={{ objectFit: 'contain' }}
2425
className={booleanFilter(
2526
'duration-700 ease-in-out group-hover:opacity-75',
2627
loading
2728
? 'scale-110 blur-2xl grayscale'
2829
: 'scale-100 blur-0 grayscale-0'
2930
)}
30-
onLoadingComplete={() => setLoading(false)}
31+
onLoad={() => setLoading(false)}
3132
/>
3233
</div>
3334
<h2 className="text-lg md:text-xl font-bold cursor-pointer hover:text-[#09AFC6]">

src/components/Events/Events.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default function Events() {
8080
<Link
8181
href="https://kommunity.com/reactjs-developer-community-kenya-reactdevske/events"
8282
target="_blank"
83-
className="bg-[#61dafb] text-black px-6 w-full max-w-[350px] text-center py-3 rounded-md font-semibold text-lg hover:bg-[#48cae4] transition duration-300 ease-in-out hover:scale-105 hover:shadow-lg"
83+
className="bg-[#61dafb] text-black! px-6 w-full max-w-[350px] text-center py-3 rounded-md font-semibold text-lg hover:bg-[#48cae4] transition duration-300 ease-in-out hover:scale-105 hover:shadow-lg"
8484
>
8585
See More Events
8686
</Link>

src/components/HeroHeader/DesktopHero.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import LinkButton from '../LinkButton/LinkButton';
32

43
export default function HeroHeader() {
@@ -20,7 +19,7 @@ export default function HeroHeader() {
2019
</p>
2120
<div className="flex items-center justify-center relative">
2221
<LinkButton
23-
className="flex justify-center items-center bg-[#EC0505] hover:bg-[#e12e2e] transition-all duration:200 hover:scale-105 w-[307px] h-[61px] rounded-md text-white font-montserrat font-bold"
22+
className="flex justify-center items-center bg-[#EC0505] hover:bg-[#e12e2e] transition-all duration:200 hover:scale-105 w-[307px] h-[61px] rounded-md text-white! font-montserrat font-bold"
2423
href="https://bit.ly/joinreactdevske"
2524
target="_blank"
2625
rel="noopener noreferrer"

src/components/Logo/Logo.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import Image from 'next/image';
32
import logo from '../../../public/img/logo.svg';
43

@@ -13,8 +12,8 @@ export default function Logo({ size }: LogoType) {
1312
alt="React developer community Kenya logo"
1413
width={size}
1514
height={size}
16-
layout="fixed"
1715
className="motion-safe:animate-spin"
16+
style={{ animationDuration: '10s', width: 'auto', height: 'auto' }}
1817
/>
1918
);
2019
}

0 commit comments

Comments
 (0)