Skip to content

Commit b75d063

Browse files
flyer addition
1 parent fabfda2 commit b75d063

File tree

3 files changed

+137
-5
lines changed

3 files changed

+137
-5
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import { useState, useEffect } from "react";
2+
import { X, ExternalLink, Globe } from "lucide-react";
3+
import { Button } from "@/components/ui/button";
4+
import { Card, CardContent } from "@/components/ui/card";
5+
6+
interface TestingMasterFlyerProps {
7+
onClose: () => void;
8+
}
9+
10+
const TestingMasterFlyer = ({ onClose }: TestingMasterFlyerProps) => {
11+
return (
12+
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4">
13+
<Card className="w-full max-w-md mx-auto relative animate-in fade-in-0 zoom-in-95 duration-300">
14+
<Button
15+
variant="ghost"
16+
size="icon"
17+
className="absolute right-2 top-2 h-8 w-8"
18+
onClick={onClose}
19+
>
20+
<X className="h-4 w-4" />
21+
</Button>
22+
23+
<CardContent className="p-6 pt-12 text-center">
24+
<div className="mb-4">
25+
<div className="w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-primary to-primary-glow rounded-full flex items-center justify-center">
26+
<Globe className="h-8 w-8 text-white" />
27+
</div>
28+
<h3 className="text-xl font-bold mb-2">
29+
Welcome to Awesome-Playwright
30+
</h3>
31+
<p className="text-muted-foreground text-sm mb-4">
32+
This awesome Playwright resource collection is part of the larger TestingMaster.in ecosystem.
33+
Discover more testing tools, frameworks, and learning paths!
34+
</p>
35+
</div>
36+
37+
<div className="space-y-3">
38+
<Button
39+
className="w-full bg-primary hover:bg-primary/90"
40+
onClick={() => {
41+
window.open("https://testingmaster.in", "_blank");
42+
onClose();
43+
}}
44+
>
45+
<Globe className="h-4 w-4 mr-2" />
46+
Visit TestingMaster.in
47+
<ExternalLink className="h-3 w-3 ml-2" />
48+
</Button>
49+
50+
<Button
51+
variant="outline"
52+
className="w-full"
53+
onClick={onClose}
54+
>
55+
Continue Exploring
56+
</Button>
57+
</div>
58+
59+
<p className="text-xs text-muted-foreground mt-4">
60+
Built with ❤️ for the testing community
61+
</p>
62+
</CardContent>
63+
</Card>
64+
</div>
65+
);
66+
};
67+
68+
export default TestingMasterFlyer;

src/data/resources.ts

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export const categories = [
1919
"Premium Courses",
2020
"Integrations",
2121
"Reporters",
22-
"Playwright Official"
22+
"Playwright Official",
23+
"AI/MCP"
2324
];
2425

2526
export const playwrightResources: Resource[] = [
@@ -265,7 +266,7 @@ export const playwrightResources: Resource[] = [
265266
title: "cucumber-playwright",
266267
description: "A starter repo for writing E2E tests based on Cucumber with Playwright using TypeScript",
267268
url: "https://github.com/Tallyb/cucumber-playwright",
268-
category: "Integrations",
269+
category: "Sample Frameworks",
269270
tags: ["integrations", "cucumber", "bdd"],
270271
isGithub: true,
271272
},
@@ -740,14 +741,59 @@ export const playwrightResources: Resource[] = [
740741
},
741742
{
742743
id: "84",
744+
title: "Playwright MCP",
745+
description: "Playwright MCP (Model-based Conformance Protocol) is a framework for building and running model-based tests with Playwright",
746+
url: "https://github.com/microsoft/playwright-mcp",
747+
category: "AI/MCP",
748+
tags: ["AI", "MCP", "Playwright"],
749+
isGithub: true,
750+
},
751+
{
752+
id: "85",
743753
title: "PW Framework Step By Step",
744754
description: "A step-by-step guide to building a Playwright framework with best practices",
745755
url: "https://github.com/idavidov13/PW-Framework-Step-By-Step",
746756
category: "Sample Frameworks",
747757
tags: ["Sample Frameworks", "Playwright", "Community"],
748758
isGithub: true,
749-
}
759+
},
750760

751-
761+
{
762+
id: "86",
763+
title: "MCP Playwright By Execute Automation",
764+
description: "A framework for building and running model-based tests with Playwright",
765+
url: "https://github.com/executeautomation/mcp-playwright",
766+
category: "AI/MCP",
767+
tags: ["AI", "MCP", "Playwright"],
768+
isGithub: true,
769+
},
770+
{
771+
id: "87",
772+
title: "Scrapy Playwright",
773+
description: "A Scrapy plugin that integrates Playwright for web scraping",
774+
url: "https://github.com/scrapy-plugins/scrapy-playwright",
775+
category: "Sample Frameworks",
776+
tags: ["Sample Frameworks", "Scrapy", "Web Scraping"],
777+
isGithub: true,
778+
},
779+
{
780+
id: "88",
781+
title: "Playwright Microsoft Teams Reporter",
782+
description: "A Playwright reporter that sends test results to Microsoft Teams",
783+
url: "https://github.com/playwright-community/playwright-msteams-reporter",
784+
category: "Reporters",
785+
tags: ["Reporters", "Playwright", "Microsoft Teams"],
786+
isGithub: true,
787+
},
788+
{
789+
//https://github.com/vitalets/playwright-bdd
790+
id: "89",
791+
title: "Playwright BDD",
792+
description: "BDD testing with Playwright runner and CucumberJS integration",
793+
url: "https://github.com/vitalets/playwright-bdd",
794+
category: "Integrations",
795+
tags: ["Integrations", "Playwright", "BDD"],
796+
isGithub: true,
797+
}
752798
];
753799

src/pages/Index.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1-
import { useState, useMemo, useRef } from "react";
1+
import { useState, useMemo, useRef, useEffect } from "react";
22
import Hero from "@/components/Hero";
33
import ResourceCard from "@/components/ResourceCard";
44
import SearchFilters from "@/components/SearchFilters";
5+
import TestingMasterFlyer from "@/components/TestingMasterFlyer";
56
import { playwrightResources, categories } from "@/data/resources";
67
import { shuffleArray } from "@/lib/shuffle";
78
import { Globe, ExternalLink} from 'lucide-react';
89

910
const Index = () => {
1011
const [searchTerm, setSearchTerm] = useState("");
1112
const [selectedCategory, setSelectedCategory] = useState("All");
13+
const [showFlyer, setShowFlyer] = useState(false);
1214
const resourcesRef = useRef<HTMLElement>(null);
1315

1416
// Shuffle resources once when component mounts
1517
const shuffledResources = useMemo(() => shuffleArray(playwrightResources), []);
1618

19+
// Show flyer after 10 seconds
20+
useEffect(() => {
21+
const timer = setTimeout(() => {
22+
setShowFlyer(true);
23+
}, 10000); // 10 seconds
24+
25+
return () => clearTimeout(timer);
26+
}, []);
27+
28+
const handleCloseFlyer = () => {
29+
setShowFlyer(false);
30+
};
31+
1732
const scrollToResources = () => {
1833
resourcesRef.current?.scrollIntoView({
1934
behavior: 'smooth',
@@ -121,6 +136,9 @@ const Index = () => {
121136
</div>
122137
</div>
123138
</footer>
139+
140+
{/* TestingMaster Flyer */}
141+
{showFlyer && <TestingMasterFlyer onClose={handleCloseFlyer} />}
124142
</div>
125143
);
126144
};

0 commit comments

Comments
 (0)