Skip to content

Commit f0437cb

Browse files
committed
fix(tests): remove marquee tests and run screenshots
1 parent 3972515 commit f0437cb

3 files changed

Lines changed: 0 additions & 87 deletions

File tree

tests/components.spec.ts

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -26,90 +26,3 @@ test.describe('Component - Dev tools', () => {
2626
console.error(error)
2727
}
2828
})
29-
30-
test.describe('Component - Marquee', () => {
31-
const TOTAL_IMAGES = 9
32-
const MARQUEE_HEIGHT = 70
33-
const MARQUEE_SPAN = 'Some of my main stack'
34-
const MARQUEE_IMAGES = [
35-
'Mongodb',
36-
'Jest',
37-
'Nodejs',
38-
'Docker',
39-
'Nextjs',
40-
'Tailwind',
41-
'Postgresql',
42-
'Playwright',
43-
'AWS',
44-
]
45-
46-
test.beforeEach(async ({ page }) => {
47-
try {
48-
await page.waitForLoadState()
49-
} catch (error) {
50-
console.error(error)
51-
}
52-
})
53-
54-
test('Expected - Marquee to be visible', async ({ page }) => {
55-
try {
56-
await page.goto(HOME)
57-
58-
const PAGE_LOCATOR = page.locator('div').filter({ hasText: MARQUEE_SPAN })
59-
60-
await expect(PAGE_LOCATOR).toBeVisible()
61-
} catch (error) {
62-
console.log(error)
63-
}
64-
})
65-
test('Expected - Correct height and width, 70px 100vw', async ({ page }) => {
66-
try {
67-
await page.goto(HOME)
68-
69-
const PAGE_LOCATOR = page.locator('div').filter({ hasText: MARQUEE_SPAN })
70-
71-
const marquee = await PAGE_LOCATOR.boundingBox()
72-
73-
const viewPort = page.viewportSize()
74-
75-
if (viewPort === null) throw new Error('Viewport is null')
76-
77-
const { width } = viewPort
78-
79-
expect(marquee?.width).toBe(width)
80-
expect(marquee?.height).toBe(MARQUEE_HEIGHT)
81-
} catch (error) {
82-
console.error(error)
83-
}
84-
})
85-
86-
test('Expected - Total images number', async ({ page }) => {
87-
try {
88-
await page.goto(HOME)
89-
90-
const PAGE_LOCATOR = page.locator('div').filter({ hasText: MARQUEE_SPAN })
91-
const marqueeImages = PAGE_LOCATOR.locator('img')
92-
93-
expect(await marqueeImages.count()).toBe(TOTAL_IMAGES)
94-
} catch (error) {
95-
console.error(error)
96-
}
97-
})
98-
99-
test('Expected - All images to be visible', async ({ page }) => {
100-
try {
101-
await page.goto(HOME)
102-
const PAGE_LOCATOR = page.locator('div').filter({ hasText: MARQUEE_SPAN })
103-
104-
const marqueeImages = await PAGE_LOCATOR.locator('img').all()
105-
106-
for (const image of marqueeImages) {
107-
const alt = await image.getAttribute('alt')
108-
await expect(image).toBeVisible()
109-
expect(MARQUEE_IMAGES).toContain(alt)
110-
}
111-
} catch (error) {
112-
console.error(error)
113-
}
114-
})
115-
})
198 KB
Loading
353 KB
Loading

0 commit comments

Comments
 (0)