|
1 | 1 | import { test, expect } from '@playwright/test'; |
2 | 2 |
|
3 | | -test.describe('Options 26 - The Styler', () => { |
| 3 | +test.describe('Options 26 - The Styler / CSS Styler', () => { |
4 | 4 | test.beforeEach(async ({ page }) => { |
5 | 5 | await page.goto('#/options26'); |
6 | 6 | }); |
@@ -32,4 +32,21 @@ test.describe('Options 26 - The Styler', () => { |
32 | 32 | const dropLoc2 = await page.locator('[data-test=select2] .ms-choice span', { hasText: '[Group 1: Option 1]' }); |
33 | 33 | await dropLoc2.waitFor(); |
34 | 34 | }); |
| 35 | + |
| 36 | + test('third select has February & April with custom CSS styler', async ({ page }) => { |
| 37 | + await page.locator('[data-test=select3].ms-parent').click(); |
| 38 | + const optionLoc2 = await page.locator('[data-test=select3] .ms-drop ul li').nth(1); |
| 39 | + optionLoc2.click(); |
| 40 | + expect(optionLoc2).toHaveText('February'); |
| 41 | + await expect(optionLoc2).toHaveCSS('color', 'rgb(0, 20, 255)'); |
| 42 | + await expect(optionLoc2).toHaveCSS('background-color', 'rgb(111, 190, 255)'); |
| 43 | + |
| 44 | + const optionLoc4 = await page.locator('[data-test=select3] .ms-drop ul li').nth(3); |
| 45 | + optionLoc4.click(); |
| 46 | + expect(optionLoc4).toHaveText('April'); |
| 47 | + await expect(optionLoc4).toHaveCSS('color', 'rgb(255, 255, 255)'); |
| 48 | + await expect(optionLoc4).toHaveCSS('background-color', 'rgb(151, 39, 39)'); |
| 49 | + const selectedText3 = page.locator('[data-test=select3] .ms-choice span', { hasText: 'February, April' }); |
| 50 | + await selectedText3.waitFor(); |
| 51 | + }); |
35 | 52 | }); |
0 commit comments