test: fix e2e testing setup
This commit is contained in:
@@ -178,7 +178,7 @@ Due to mounted volumes, we recommend running the setup as a root user. If you wi
|
||||
1. Once the server has finished rebooting, log back into the server and start the Standard Notes server process:
|
||||
|
||||
```shell
|
||||
cd standalone
|
||||
cd self-hosted
|
||||
./server.sh start
|
||||
```
|
||||
|
||||
|
||||
@@ -40,16 +40,18 @@ Object.assign(window, SNLibrary);
|
||||
|
||||
### E2E Tests
|
||||
|
||||
To run a stable server environment for E2E tests that is up to date with production, clone the [e2e repository](https://github.com/standardnotes/e2e), then run:
|
||||
To run a stable server environment for E2E tests that is up to date with production, clone the [self-hosted repository](https://github.com/standardnotes/self-hosted), then run:
|
||||
|
||||
In self-hosted repo:
|
||||
```
|
||||
yarn install --immutable
|
||||
yarn start:local-server
|
||||
yarn && yarn start
|
||||
```
|
||||
Wait for the `All services are up!` message.
|
||||
|
||||
Once the server infrastructure is ready, and you've built all packages, you can run the test suite in the browser via:
|
||||
|
||||
|
||||
In app repo:
|
||||
```
|
||||
yarn start:server:e2e
|
||||
```
|
||||
|
||||
@@ -115,15 +115,7 @@ export class SNApiService
|
||||
|
||||
public loadHost(): string {
|
||||
const storedValue = this.storageService.getValue<string | undefined>(StorageKey.ServerHost)
|
||||
this.host =
|
||||
storedValue ||
|
||||
this.host ||
|
||||
((
|
||||
window as {
|
||||
_default_sync_server?: string
|
||||
}
|
||||
)._default_sync_server as string)
|
||||
|
||||
this.host = storedValue || this.host
|
||||
return this.host
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
export const DefaultServerPort = 3123
|
||||
|
||||
export function getDefaultHost() {
|
||||
return 'http://localhost:3123'
|
||||
return `http://localhost:${DefaultServerPort}`
|
||||
}
|
||||
|
||||
export function getDefaultMockedEventServiceUrl() {
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
const syncServerHostName = urlParams.get('sync_server_host_name') ?? 'syncing-server-proxy';
|
||||
const bail = urlParams.get('bail') === 'false' ? false : true;
|
||||
|
||||
window._default_sync_server = `http://${syncServerHostName}:3123`;
|
||||
|
||||
Object.assign(window, SNCrypto);
|
||||
|
||||
Object.assign(window, SNLibrary);
|
||||
@@ -102,4 +100,4 @@
|
||||
<div id="mocha"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user