Use native Chrome for Reddit login handoff
This commit is contained in:
1 parent
2c533fa52a
commit
dbb1842ef4
13 files changed
+324
-60
No files matched your search
@@ -23,17 +23,23 @@ describe('VNC container entrypoint', () => {
|
||||
expect(script.indexOf('SingletonLock')).toBeLessThan(script.indexOf('launching bot'));
|
||||
});
|
||||
|
||||
it('launches regular Google Chrome before the bot and exposes its local CDP endpoint', () => {
|
||||
it('supports a native login phase with no DevTools before the controlled browser starts', () => {
|
||||
const script = fs.readFileSync(path.resolve('docker/entrypoint.sh'), 'utf8');
|
||||
|
||||
expect(script).toContain('google-chrome');
|
||||
expect(script).toContain('--user-data-dir="${BROWSER_SESSION_DIR}"');
|
||||
expect(script).toContain('start_native_login_chrome');
|
||||
expect(script).toContain('https://www.reddit.com/login/');
|
||||
expect(script).toContain('node dist/native-login-gate.js');
|
||||
expect(script).toContain('NATIVE_LOGIN_EXIT_CODE');
|
||||
expect(script).toContain('--remote-debugging-port="${CHROME_CDP_PORT}"');
|
||||
expect(script).toContain('export CHROME_CDP_URL=');
|
||||
expect(script).not.toContain('--enable-automation');
|
||||
expect(script.indexOf('starting Google Chrome')).toBeLessThan(
|
||||
script.indexOf('launching bot'),
|
||||
const nativeFunction = script.slice(
|
||||
script.indexOf('start_native_login_chrome()'),
|
||||
script.indexOf('start_controlled_chrome()'),
|
||||
);
|
||||
expect(nativeFunction).not.toContain('--remote-debugging');
|
||||
});
|
||||
|
||||
it('installs the stable Google Chrome package rather than Chrome for Testing', () => {
|
||||
|
||||
Reference in new issue
Block a user