diff --git a/cypress/e2e/index.spec.ts b/cypress/e2e/index.spec.ts
index 455b1283..05b50211 100644
--- a/cypress/e2e/index.spec.ts
+++ b/cypress/e2e/index.spec.ts
@@ -1,15 +1,5 @@
///
-import type { AppOptions } from '../../src/optionsStorage'
-
-const cleanVisit = (url?) => {
- cy.clearLocalStorage()
- visit(url)
-}
-
-const visit = (url = '/') => {
- window.localStorage.cypress = 'true'
- cy.visit(url)
-}
+import { setOptions, cleanVisit, visit } from './shared'
// todo use ssl
@@ -31,14 +21,8 @@ const testWorldLoad = () => {
})
}
-const setOptions = (options: Partial) => {
- cy.window().then(win => {
- Object.assign(win['options'], options)
- })
-}
-
it('Loads & renders singleplayer', () => {
- visit('/?singleplayer=1')
+ cleanVisit('/?singleplayer=1')
setOptions({
localServerOptions: {
generation: {
@@ -69,10 +53,3 @@ it('Loads & renders zip world', () => {
cy.get('input[type="file"]').selectFile('cypress/superflat.zip', { force: true })
testWorldLoad()
})
-
-it.skip('Performance test', () => {
- // select that world
- // from -2 85 24
- // await bot.loadPlugin(pathfinder.pathfinder)
- // bot.pathfinder.goto(new pathfinder.goals.GoalXZ(28, -28))
-})
diff --git a/cypress/e2e/shared.ts b/cypress/e2e/shared.ts
new file mode 100644
index 00000000..9292a8d5
--- /dev/null
+++ b/cypress/e2e/shared.ts
@@ -0,0 +1,15 @@
+import { AppOptions } from '../../src/optionsStorage'
+
+export const cleanVisit = (url?) => {
+ cy.clearLocalStorage()
+ visit(url)
+}
+export const visit = (url = '/') => {
+ window.localStorage.cypress = 'true'
+ cy.visit(url)
+}
+export const setOptions = (options: Partial) => {
+ cy.window().then(win => {
+ Object.assign(win['options'], options)
+ })
+}
diff --git a/index.html b/index.html
index 3e921855..6d3b326b 100644
--- a/index.html
+++ b/index.html
@@ -94,9 +94,7 @@
-
+