Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,19 @@ internal object AgpConfiguratorUtils {
ext.buildTypes {
val debug =
getByName("debug").apply {
manifestPlaceholders["usesCleartextTraffic"] = "true"
if (!manifestPlaceholders.containsKey("usesCleartextTraffic")) {
manifestPlaceholders["usesCleartextTraffic"] = "true"
}
}
getByName("release").apply {
manifestPlaceholders["usesCleartextTraffic"] = "false"
if (!manifestPlaceholders.containsKey("usesCleartextTraffic")) {
manifestPlaceholders["usesCleartextTraffic"] = "false"
}
}
maybeCreate("debugOptimized").apply {
manifestPlaceholders["usesCleartextTraffic"] = "true"
if (!manifestPlaceholders.containsKey("usesCleartextTraffic")) {
manifestPlaceholders["usesCleartextTraffic"] = "true"
}
initWith(debug)
matchingFallbacks += listOf("release")
externalNativeBuild { cmake { arguments("-DCMAKE_BUILD_TYPE=Release") } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ it('continues generating differences after missing, corrupt or unwritable files'
it('creates new images next to Jest snapshots', () => {
const result = createResult(true, false);
processScreenshotResults(getConfig(), [result], 'new', passedTests);
expect(result.expectedPath).toContain(
'__snapshots__/example-test.js.screenshots/',
);
// Normalize paths to work on Windows (path.join uses \ on Windows)
const expectedPath = result.expectedPath.replace(/\\/g, '/');
expect(expectedPath).toContain('__snapshots__/example-test.js.screenshots/');
expect(fs.readFileSync(result.expectedPath, 'utf8')).toBe('new image');
expect(
result.receivedPath == null || !fs.existsSync(result.receivedPath),
Expand Down
Loading