Skip to content

Commit

Permalink
demo: new route (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane authored Aug 3, 2023
1 parent d6a56f9 commit b656651
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lighthouserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = {
isSinglePageApplication: true,
url: [
'http://localhost/',
'http://localhost/4cf7a6ad03080c90',
'http://localhost/4cf7a6ad03080c90/1632948396703/1632949028503/',
'http://localhost/a2a0ccea32023010',
'http://localhost/a2a0ccea32023010/1690488081496/1690488851596/',
],
numberOfRuns: 6,
},
Expand Down
2 changes: 1 addition & 1 deletion src/__puppeteer__/demo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('demo mode', () => {
});

it('should load demo route', async () => {
await goto('/4cf7a6ad03080c90', { waitUntil: 'networkidle2' });
await goto('/a2a0ccea32023010', { waitUntil: 'networkidle2' });
await sleep(2500);

const list = await expect(page).toMatchElement('.DriveList');
Expand Down
4 changes: 2 additions & 2 deletions src/__puppeteer__/offline.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ describe('offline', () => {
});

it('should not crash when navigating while offline', async () => {
await goto('/4cf7a6ad03080c90');
await goto('/a2a0ccea32023010');
await page.waitForSelector('.DriveEntry', { timeout: 10000 });

await page.setOfflineMode(true);
await page.setCacheEnabled(false);
await page.reload({ waitUntil: 'networkidle0' });

expect(await page.$x('//*[contains(string(), "Rav4")]')).toBeTruthy();
expect(await page.$x('//*[contains(string(), "Corolla")]')).toBeTruthy();
expect(await page.$x('//*[contains(string(), "Loading...")]')).toBeTruthy();
});
});
4 changes: 2 additions & 2 deletions src/__puppeteer__/routing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('routing', () => {
});

it('load route list', async () => {
await goto('/4cf7a6ad03080c90');
await goto('/a2a0ccea32023010');
await sleep(2000);

// ".DriveList" should be visible
Expand All @@ -27,7 +27,7 @@ describe('routing', () => {
});

it('load route from URL', async () => {
await goto('/4cf7a6ad03080c90/1632948396703/1632949028503');
await goto('/a2a0ccea32023010/1690488081496/1690488851596');
await sleep(10000);

// Should load video with src
Expand Down
6 changes: 3 additions & 3 deletions src/demo/devices.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[
{
"alias": "Rav4",
"alias": "Corolla",
"device_type": "three",
"dongle_id": "4cf7a6ad03080c90",
"dongle_id": "a2a0ccea32023010",
"ignore_uploads": null,
"is_owner": false,
"shared": true,
"is_paired": true,
"last_athena_ping": 1565453808,
"last_athena_ping": 1691040268,
"sim_id": "0000000000000000000"
}
]
2 changes: 1 addition & 1 deletion src/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function isDemoDevice(dongleId) {
}

export function isDemoRoute(route) {
return route === '4cf7a6ad03080c90|2021-09-29--13-46-36';
return route === 'a2a0ccea32023010|2023-07-27--13-01-19';
}

export function isDemo() {
Expand Down
4 changes: 2 additions & 2 deletions src/initialState.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function getDefaultFilter() {

if (Demo.isDemo()) {
return {
start: 1632948396703,
end: 1632949028503,
start: 1690488081496,
end: 1690488851596,
};
}

Expand Down

0 comments on commit b656651

Please sign in to comment.