Use full Chrome for interactive Reddit login
This commit is contained in:
1 parent
70d62b2da3
commit
674cd89cd7
5 files changed
+241
-3
No files matched your search
@@ -22,4 +22,25 @@ describe('VNC container entrypoint', () => {
|
||||
expect(script).toContain('"${BROWSER_SESSION_DIR}/SingletonCookie"');
|
||||
expect(script.indexOf('SingletonLock')).toBeLessThan(script.indexOf('launching bot'));
|
||||
});
|
||||
|
||||
it('launches regular Google Chrome before the bot and exposes its local CDP endpoint', () => {
|
||||
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('--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'),
|
||||
);
|
||||
});
|
||||
|
||||
it('installs the stable Google Chrome package rather than Chrome for Testing', () => {
|
||||
const dockerfile = fs.readFileSync(path.resolve('Dockerfile'), 'utf8');
|
||||
|
||||
expect(dockerfile).toContain('google-chrome-stable_current_amd64.deb');
|
||||
expect(dockerfile).toContain('google-chrome-stable');
|
||||
expect(dockerfile).not.toContain('chrome-for-testing');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user