// FILE: _St/IG_StYellow/test_ext_auto_thumbnail_settings_v293.js | ROLE: 톱니바퀴 자동 섬네일 설정 UI 회귀
const fs = require('fs');
const assert = require('assert');
const sideHtml = fs.readFileSync(__dirname + '/side.html', 'utf8');
const side = fs.readFileSync(__dirname + '/side.js', 'utf8');
const manifest = JSON.parse(fs.readFileSync(__dirname + '/manifest.json', 'utf8'));
assert.strictEqual(manifest.version, '2.3.8.3240');
assert.strictEqual(manifest.version_name, '2.3.8.324');
assert.ok(side.includes('const IGBLUE_PACKAGE_VERSION = IGBLUE_BUILD_TAG;'));
assert.ok(side.includes('function teCreateAutoThumbnailSettings()'));
assert.ok(side.includes('{ title: "자동 섬네일", element: teAutoThumbnailUi.element }'));
assert.ok(side.includes('id = "igblue_settings_auto_thumbnail_enabled"') || side.includes('"igblue_settings_auto_thumbnail_enabled"'));
for (const id of ['igblue_settings_auto_thumbnail_explore','igblue_settings_auto_thumbnail_single_post','igblue_settings_auto_thumbnail_profile','igblue_settings_auto_thumbnail_profile_reels']) assert.ok(side.includes(id));
assert.ok(side.includes('teAutoThumbnailUi.save("settings_modal_save")'));
assert.ok(side.includes('window.IGBLUE_AUTO_THUMBNAIL_SETTINGS_V294'));
assert.ok(side.includes('Object.assign({}, readMergedUi(), values || {})'), 'modal values must override stored bridge state');
assert.ok(sideHtml.includes('자동 섬네일 설정: 우측 톱니바퀴 → 자동 섬네일'));
assert.ok(!sideHtml.includes('id="igblue_auto_thumbnail_enabled"'), 'visible duplicate DevTools thumbnail controls must be removed');
console.log('OK test_ext_auto_thumbnail_settings_v293');
