Skip to content

Commit

Permalink
fix: fix generating screenshots names (#7752)
Browse files Browse the repository at this point in the history
* fix: fix generating screenshots names

* fix: fix skip for colorSchemes
  • Loading branch information
EldarMuhamethanov authored Oct 15, 2024
1 parent a92d76b commit 975878d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions packages/vkui/playwright-ct.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,48 +126,48 @@ function generateProjects(): TestProject {

const colorSchemes = [ColorScheme.LIGHT, ColorScheme.DARK];
const projects = colorSchemes
.map((colorScheme) => [
.map((colorSchemeType) => [
{
name: `android (chromium) • ${colorScheme}`,
name: `android (chromium) • ${colorSchemeType}`,
use: {
...getDeviceDescriptorWithoutScaleFactor('Pixel 5'),
colorScheme,
colorSchemeType,
platform: Platform.ANDROID,
},
},

{
name: `ios (webkit) • ${colorScheme}`,
name: `ios (webkit) • ${colorSchemeType}`,
use: {
...getDeviceDescriptorWithoutScaleFactor('iPhone XR'),
colorScheme,
colorSchemeType,
platform: Platform.IOS,
},
},

{
name: `vkcom (chromium) • ${colorScheme}`,
name: `vkcom (chromium) • ${colorSchemeType}`,
use: {
...getDeviceDescriptorWithoutScaleFactor('Desktop Chrome'),
colorScheme,
colorSchemeType,
platform: Platform.VKCOM,
},
},

{
name: `vkcom (firefox) • ${colorScheme}`,
name: `vkcom (firefox) • ${colorSchemeType}`,
use: {
...getDeviceDescriptorWithoutScaleFactor('Desktop Firefox'),
colorScheme,
colorSchemeType,
platform: Platform.VKCOM,
},
},

{
name: `vkcom (webkit) • ${colorScheme}`,
name: `vkcom (webkit) • ${colorSchemeType}`,
use: {
...getDeviceDescriptorWithoutScaleFactor('Desktop Safari'),
colorScheme,
colorSchemeType,
platform: Platform.VKCOM,
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/vkui/src/testing/e2e/index.playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const test = testBase.extend<VKUITestOptions & InternalVKUITestOptions &
async (
{
platform,
colorScheme,
colorSchemeType,
defaultBrowserType,
onlyForBrowsers,
onlyForPlatforms,
Expand All @@ -91,7 +91,7 @@ export const test = testBase.extend<VKUITestOptions & InternalVKUITestOptions &
const skipReasons = [
{ type: 'browser', matchList: onlyForBrowsers || [], value: defaultBrowserType },
{ type: 'platform', matchList: onlyForPlatforms || [], value: platform },
{ type: 'colorScheme', matchList: onlyForColorSchemes || [], value: colorScheme },
{ type: 'colorScheme', matchList: onlyForColorSchemes || [], value: colorSchemeType },
]
.filter(
({ matchList, value }) => matchList.length > 0 && matchList.every((i) => i !== value),
Expand Down

0 comments on commit 975878d

Please sign in to comment.