Skip to content

Commit

Permalink
Add second client to orbitting test
Browse files Browse the repository at this point in the history
  • Loading branch information
hobinjk-ptc committed Sep 13, 2024
1 parent 39e1389 commit 2fd3535
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/server-remote-operator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ afterAll(async () => {
await sleep(1000);
});

async function openSecondPageAndOrbit(browser) {
const page = await browser.newPage();

await page.goto(
localRemoteOperator,
{
timeout: 60 * 1000,
},
);

await page.waitForSelector('#gltf-added', {
timeout: 60 * 1000
});

await page.keyboard.press('KeyO');

return page;
}

test('server provides remote operator functionality', async () => {
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox', '--ignore-certificate-errors'],
Expand Down Expand Up @@ -70,6 +89,8 @@ test('server provides remote operator functionality', async () => {

await sleep(2000);

const secondPagePromise = openSecondPageAndOrbit(browser);

await page.goto(
// `https://${localSettings.serverUrl}/stable/n/${localSettings.networkUUID}/s/${localSettings.networkSecret}/`,
localRemoteOperator,
Expand Down Expand Up @@ -130,6 +151,9 @@ test('server provides remote operator functionality', async () => {

await page.close();

const secondPage = await secondPagePromise;
await secondPage.close();

await browser.close();

console.log('basic remote operator through proxy server page load worked');
Expand Down

0 comments on commit 2fd3535

Please sign in to comment.