@@ -4,6 +4,8 @@ import { test, expect } from "@playwright/test";
44const baseUrl = "https://www.crocoder.dev" ;
55const bookACallSection = "book-a-call-section" ;
66const discoverOurServices = "discover-our-services" ;
7+ const blogUrl = "blog" ;
8+ const contactUrl = "contact" ;
79
810test . describe ( "Landing page" , ( ) => {
911 test . beforeEach ( async ( { page } ) => {
@@ -46,4 +48,81 @@ test.describe("Navigation via links to", () => {
4648 await expect ( page ) . toHaveURL ( `${ baseUrl } /#${ discoverOurServices } ` ) ;
4749 await expect ( page . locator ( `#${ discoverOurServices } ` ) ) . toBeInViewport ( ) ;
4850 } ) ;
51+
52+ test ( "how we rebuilt a legacy ui with zero downtime blog post" , async ( {
53+ page,
54+ } ) => {
55+ const caseStudy = page
56+ . locator ( "#animation-wrapper section" )
57+ . filter ( { hasText : "Expert Led Digital" } ) ;
58+
59+ await caseStudy . scrollIntoViewIfNeeded ( ) ;
60+ await expect ( caseStudy . getByRole ( "link" ) ) . toBeInViewport ( ) ;
61+ await caseStudy . getByRole ( "link" ) . click ( ) ;
62+
63+ await Promise . all ( [
64+ page . waitForURL (
65+ `${ baseUrl } /${ blogUrl } /how-we-rebuilt-a-legacy-ui-with-zero-downtime` ,
66+ ) ,
67+ page . getByText (
68+ "How We Rebuilt a Legacy UI With Zero Downtime: A Case Study in Component Libraries and Frontend Guidance" ,
69+ ) ,
70+ ] ) ;
71+ } ) ;
72+
73+ test ( "using lago to create a flexible billing system blog post" , async ( {
74+ page,
75+ } ) => {
76+ const caseStudy = page
77+ . locator ( "#animation-wrapper section" )
78+ . filter ( { hasText : "Product & Platform" } ) ;
79+
80+ await caseStudy . scrollIntoViewIfNeeded ( ) ;
81+ await expect ( caseStudy . getByRole ( "link" ) ) . toBeInViewport ( ) ;
82+ await caseStudy . getByRole ( "link" ) . click ( ) ;
83+
84+ await Promise . all ( [
85+ page . waitForURL (
86+ `${ baseUrl } /${ blogUrl } /using-lago-to-create-a-flexible-billing-system` ,
87+ ) ,
88+ page . getByText ( "Using Lago to Create a Flexible Billing System" ) ,
89+ ] ) ;
90+ } ) ;
91+
92+ test ( "Contact us page" , async ( { page } ) => {
93+ const contactUsLink = page . getByRole ( "link" , {
94+ name : "Schedule a free DevEx audit" ,
95+ } ) ;
96+
97+ await page
98+ . locator ( "#animation-wrapper section" )
99+ . filter ( { hasText : "Workflow & Release" } )
100+ . scrollIntoViewIfNeeded ( ) ;
101+ await expect ( contactUsLink ) . toBeInViewport ( ) ;
102+ await contactUsLink . click ( ) ;
103+
104+ await Promise . allSettled ( [
105+ page . waitForURL ( `${ baseUrl } /${ contactUrl } ` , { timeout : 10000 } ) ,
106+ expect ( page . getByText ( "get in touch" ) ) . toBeVisible ( ) ,
107+ ] ) ;
108+ } ) ;
109+
110+ test ( "migrating an enterprise app from angularjs to react blog post" , async ( {
111+ page,
112+ } ) => {
113+ const caseStudy = page
114+ . locator ( "#animation-wrapper section" )
115+ . filter ( { hasText : "Team Enablement & Upskilling" } ) ;
116+
117+ await caseStudy . scrollIntoViewIfNeeded ( ) ;
118+ await expect ( caseStudy . getByRole ( "link" ) ) . toBeInViewport ( ) ;
119+ await caseStudy . getByRole ( "link" ) . click ( ) ;
120+
121+ await Promise . all ( [
122+ page . waitForURL (
123+ `${ baseUrl } /${ blogUrl } /migrating-an-enterprise-app-from-angularjs-to-react` ,
124+ ) ,
125+ page . getByText ( "Migrating an Enterprise App from AngularJS to React" ) ,
126+ ] ) ;
127+ } ) ;
49128} ) ;
0 commit comments