Skip to content

Commit

Permalink
Fix ports
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Jul 18, 2024
1 parent c70baa9 commit 23a81d4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/clientInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

export default async function clientInteractionTest(browser: Browser) {
const appPage = await browser.newPage();
await appPage.goto('http://localhost:5000/tests/test.html');
await appPage.goto('http://localhost:3007/tests/test.html');

const findTextOnAppPage = findTextBySelector(appPage);

Expand Down
2 changes: 1 addition & 1 deletion tests/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const findButtonExtensionByText = (context: Page) =>
findElementByText(context, 'button:not(:disabled) > span');
export const findTextBySelector = (context: Page) => findElementByText(context, '');

export const startServer = (port: number = 5000): Server => {
export const startServer = (port: number = 3007): Server => {
const app = express();
app.use(express.static(resolve('./holo-key-manager-js-client')));
return app.listen(port);
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ afterAll(async () => {
describe('End-to-End Tests for Extension and Client', () => {
it('should not allow the client to interact with the extension before setup', async () => {
const page = await browser.newPage();
await page.goto('http://localhost:5000/tests/test.html');
await page.goto('http://localhost:3007/tests/test.html');

const findTextOnPage = findTextBySelector(page);

Expand Down
2 changes: 1 addition & 1 deletion tests/needsSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { findTextBySelector } from './helpers';

export default async function needsSetupTest(browser: Browser) {
const page = await browser.newPage();
await page.goto('http://localhost:5000/tests/test.html');
await page.goto('http://localhost:3007/tests/test.html');

const findTextOnPage = findTextBySelector(page);

Expand Down
4 changes: 2 additions & 2 deletions tests/preventSignatureFromOtherOrigin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { expect } from 'vitest';
import { startServer } from './helpers';

export default async function preventSignatureFromOtherOrigin(browser: Browser) {
const server = startServer(6000);
const server = startServer(3008);

const maliciousPage = await browser.newPage();
await maliciousPage.goto('http://localhost:6000');
await maliciousPage.goto('http://localhost:3008');

try {
const result = await maliciousPage.evaluate(async () => {
Expand Down

0 comments on commit 23a81d4

Please sign in to comment.