Browse Source

Modificato readme

John Doe 1 year ago
parent
commit
7f61514798

+ 0 - 45
.github/workflows/cypress.yml

@@ -1,45 +0,0 @@
-name: End-to-end tests
-on:
-  push:
-    branches: [ master ]
-  pull_request:
-    branches: [ master ]
-jobs:
-  cypress-run:
-    runs-on: ubuntu-latest
-    steps:      
-      - name: Setup Node
-        uses: actions/setup-node@v3
-        with:
-          node-version: 16
-
-      - name: Checkout
-        uses: actions/checkout@v3
-
-      - name: Cypress run
-        uses: cypress-io/github-action@v2
-        with:
-          build: npm run build
-          start: npm run serve
-          wait-on: http://localhost:5000
-          config: baseUrl=http://localhost:5000
-          browser: chrome
-        env:
-          VITE_NO_WELCOME: 1
-          VITE_CI: 1
-          VITE_SOCKET_URL: https://public.jeremiez.net/
-          VITE_SOCKET_PATH: /wamp/socket.io
-          VITE_API_ENDPOINT: https://ricochetjs-deploy-production.up.railway.app/
-          VITE_RICOCHET_SITEID: airboardgame
-          ACTIONS_ALLOW_UNSECURE_COMMANDS: true
-      - uses: actions/upload-artifact@v1
-        if: failure()
-        with:
-          name: cypress-screenshots
-          path: cypress/screenshots
-      # Test run video was always captured, so this action uses "always()" condition
-      - uses: actions/upload-artifact@v1
-        if: always()
-        with:
-          name: cypress-videos
-          path: cypress/videos

+ 0 - 58
.github/workflows/lint-deploy.yml

@@ -1,58 +0,0 @@
-# .github/workflows/netlify.yml
-name: Build and Deploy to Netlify
-on:
-  pull_request:
-  push:
-  workflow_dispatch:
-jobs:
-  build:
-    runs-on: ubuntu-20.04
-    steps:
-      - uses: actions/checkout@v3
-        
-      - uses: actions/setup-node@v3
-        with:
-          node-version: 16
-
-      - run: npm ci
-      - run: npm run lint  
-      - run: |
-          cat <<EOF > ./backend/.env
-          OPENVIDU_URL=${{ secrets.OPENVIDU_URL }}
-          OPENVIDU_SECRET=${{ secrets.OPENVIDU_SECRET }}
-          EOF
-      - run: cat backend/.env
-      - run: cd backend && npm ci && npm run build
-        env:      
-          RICOCHET_SITE_KEY: ${{ secrets.RICOCHET_SECRET_KEY }}
-      - run: npm run build
-        env:
-          VITE_API_ENDPOINT: /api
-          VITE_SOCKET_URL: https://public.jeremiez.net/
-          VITE_SOCKET_PATH: /wamp/socket.io
-          VITE_RICOCHET_SITEID: airboardgame
-          VITE_USE_PROXY: 0
-          VITE_WEBCONFERENCE: audio
-          VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
-          VITE_ENVIRONMENT: production
-          CYPRESS_INSTALL_BINARY: 0
-      - run: |
-          cat <<EOF > ./dist/_redirects
-          /api/*  https://ricochetjs-deploy-production.up.railway.app/:splat  200
-          /*    /index.html   200
-          EOF
-
-      - name: Deploy to Netlify
-        uses: nwtgck/actions-netlify@v1.2
-        with:
-          publish-dir: './dist'
-          production-branch: master
-          github-token: ${{ secrets.GITHUB_TOKEN }}
-          deploy-message: "Deploy from GitHub Actions"
-          enable-pull-request-comment: false
-          enable-commit-comment: true
-          overwrites-pull-request-comment: true
-        env:
-          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
-          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
-        timeout-minutes: 1

+ 2 - 98
README.md

@@ -1,102 +1,6 @@
-# Air board game - the free online tabletop simulator
+# Clonata da / Cloned from https://github.com/jrmi/airboardgame
 
-Join us on Discord - [![Discord](https://img.shields.io/discord/899259310620696616)](https://discord.gg/EsZGJ5h6UA)
+# Air board game - the free online tabletop simulator
 
 If you just want to play, go [here](https://airboardgame.net).
 
-* **Choose** a game
-* **Share** the link with your friends
-* **Play** together
-
-Simple, fast and efficient.
-
-No need to create an account, choose a game from the list ([or create yours](#game-designer-its-also-for-you)) share
-the displayed link with your friends by mail or any channel you have in common
-and wait for your friends to join you.
-
-## A tabletop simulator ?
-
-![In action](./public/screen.png)
-
-Airboardgame is a tabletop simulator to play your favorite board games with your
-friends online. It's not a game engine, it's just a tabletop simulator of what you can
-do with a real table. You share a common space with other players like if you were is the same room.
-If you move something or if you flip a card, other players see
-this action and can respond in real time.
-
-Hint: you really should use an audio conference application to speak with other players.
-
-Airboardgame doesn't force you, you make the rules.
-Airboardgame is just a game table simulator : what you would do with a real
-table you can/must do it with Airboargame.
-
-## Features for players
-
-Flip card items.
-
-![Load and save](./public/flip.gif)
-
-Tap items.
-
-![Load and save](./public/tap.gif)
-
-Flip cards only for you, like hand cards.
-
-![Load and save](./public/flipyou.gif)
-
-See other players cursor on the shared board and how they move in real time.
-You can show things, see what they are doing, …
-
-![Load and save](./public/other.gif)
-
-Save and restore game.
-
-![Load and save](./public/loadsave.png)
-
-and more…
-
-## Game designer, it's also for you
-
-Airboardgame is not only designed to play games but also to create them.
-In just few minutes you can create simple games without any
-development skills and play with your friends.
-
-You want to test a concept? Try a print & play game? You can use Airboardgame
-without the need for more hardware.
-
-The only limit is your imagination.
-
-To access this features, login then click on the « Create new game » button on home page.
-
-We want Airboardgame to be simple, intuitive web application.
-Just give a try and if you like it share it and contribute.
-
-You can create a game with simple actions :
-
-* Create items like
-  * Round,
-  * Rectangle,
-  * Dice,
-  * Note,
-  * Counter,
-  * Image that can represent cards, board, token, perks, …
-  * Pre-made items
-  * …
-* Choose board size
-* Add available items not on the board but in the "game box" like extension or material for more user.
-
-You can drag'n'drop image from your desktop to the board to use them in Airboardgame.
-
-## Technical details
-
-* Open source web application,
-* Made with React and Socket.io,
-* Use Recoiljs as state management,
-* Client to client driven architecture,
-* Use Ricochet.js as backend framework.
-
-## Developper documentation
-
-* [Installation instructions](docs/dev.md)
-* [Deploy your own instance](docs/dev.md)
-* [Contributing guide](docs/dev.md)

+ 0 - 5
cypress/fixtures/example.json

@@ -1,5 +0,0 @@
-{
-  "name": "Using fixtures to represent data",
-  "email": "hello@cypress.io",
-  "body": "Fixtures are a great way to mock data for responses to routes"
-}

+ 0 - 64
cypress/integration/authentication.spec.js

@@ -1,64 +0,0 @@
-describe("Studio", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      "[]"
-    );
-    cy.visit("/");
-  });
-
-  it("Can see Log in button", () => {
-    cy.contains("Log in");
-  });
-
-  it("Can ask to log in", () => {
-    cy.intercept(
-      {
-        method: "POST",
-        url: "/airboardgame/auth/",
-      },
-      (req) => {
-        expect(req.body).to.deep.equal({ userEmail: "test@fake.fr" });
-        req.reply(req.body);
-      }
-    );
-
-    cy.contains("Log in").click();
-    cy.get(".side-panel input").type("test@fake.fr");
-
-    cy.contains("Ask an authentication link").click();
-
-    cy.contains("Mail sent");
-    cy.contains("Ok").click();
-
-    cy.contains("Mail sent").should("not.exist");
-  });
-
-  it("Can verify login", () => {
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/auth/verify/titi/toto",
-      },
-      (req) => {
-        req.reply("Ok");
-      }
-    );
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/auth/check",
-      },
-      // eslint-disable-next-line quotes
-      '{"message":"success"}'
-    );
-
-    cy.visit("/login/titi/toto");
-
-    cy.contains("Studio");
-  });
-});

+ 0 - 147
cypress/integration/board.spec.js

@@ -1,147 +0,0 @@
-describe("Board interactions", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      "[]"
-    );
-    cy.visit("/");
-    cy.contains("0 Test game", { timeout: 10000 })
-      .parent()
-      .find(".img-wrapper")
-      .click();
-    // Way board loading
-    cy.get(".board-pane", { timeout: 10000 }).should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11693, -11917)"
-    );
-    cy.get(".item")
-      .first()
-      .children()
-      .first()
-      .should("have.css", "transform", "none");
-  });
-
-  it("Load game page", () => {
-    cy.contains("0 Test game");
-    cy.get("[alt=Save]");
-    cy.get("[alt='Help & info']");
-    cy.get("[title='Add an item']");
-  });
-
-  it("Pan board with left click when move first", () => {
-    cy.get(".board")
-      .trigger("pointerdown", {
-        force: true,
-        clientX: 100,
-        clientY: 100,
-        pointerId: 1,
-        buttons: 1,
-      })
-      .trigger("pointermove", {
-        clientX: 200,
-        clientY: 200,
-        pointerId: 1,
-        force: true,
-        buttons: 1,
-      })
-      .trigger("pointerup", {
-        force: true,
-        pointerId: 1,
-        isPrimary: true,
-        buttons: 1,
-      });
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11593, -11817)"
-    );
-  });
-
-  it("Pan board with left click and meta when in select mode", () => {
-    cy.get("[title^='Switch to select mode']").click({
-      scrollBehavior: false,
-    });
-    cy.get(".board")
-      .trigger("pointerdown", {
-        buttons: 1,
-        clientX: 100,
-        clientY: 100,
-        pointerId: 1,
-        altKey: true,
-      })
-      .trigger("pointermove", {
-        button: 0,
-        clientX: 200,
-        clientY: 200,
-        pointerId: 1,
-        altKey: true,
-        buttons: 1,
-        force: true,
-      })
-      .trigger("pointerup", {
-        force: true,
-        pointerId: 1,
-        buttons: 1,
-        isPrimary: true,
-      });
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11593, -11817)"
-    );
-  });
-
-  it("Pan board with middle click when select is main action", () => {
-    cy.get("[title^='Switch to select mode']").click({
-      scrollBehavior: false,
-    });
-
-    cy.get(".board")
-      .trigger("pointerdown", {
-        button: 0,
-        x: 150,
-        y: 200,
-        clientX: 150,
-        clientY: 200,
-        pointerId: 1,
-        force: true,
-        scrollBehavior: false,
-        buttons: 4,
-      })
-      .trigger("pointermove", {
-        button: 0,
-        x: 400,
-        y: 400,
-        clientX: 400,
-        clientY: 400,
-        pointerId: 1,
-        force: true,
-        buttons: 4,
-        scrollBehavior: false,
-      })
-      .trigger("pointerup", {
-        force: true,
-        pointerId: 1,
-        isPrimary: true,
-        scrollBehavior: false,
-        buttons: 4,
-      });
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11443, -11717)"
-    );
-  });
-});
-
-/* TODO
-
-- Change main navigation
-- show/Hide menu
-
-*/

+ 0 - 61
cypress/integration/homepage.spec.js

@@ -1,61 +0,0 @@
-describe("Homepage", () => {
-  beforeEach(() => {
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      "[]"
-    );
-    cy.visit("/games");
-  });
-
-  it("should show all available games by default", () => {
-    cy.contains("0 Test game").should("be.visible");
-    cy.contains("1 Performance game to test strange things and other").should(
-      "be.visible"
-    );
-  });
-
-  it("should show both default games if searching for 'test' string", () => {
-    cy.get('input[name="game-search"').type("test");
-    cy.contains("0 Test game").should("be.visible");
-    cy.contains("1 Performance game to test strange things and other").should(
-      "be.visible"
-    );
-  });
-
-  it("should show only game 1 if searching for 'Performance' string", () => {
-    cy.get('input[name="game-search"').type("Performance");
-    cy.contains("0 Test game").should("not.exist");
-    cy.contains("1 Performance game to test strange things and other").should(
-      "be.visible"
-    );
-  });
-
-  it("should not show any game for 'thisisafancystring' string", () => {
-    cy.get('input[name="game-search"').type("thisisafancystring");
-    cy.contains("0 Test game").should("not.exist");
-    cy.contains("1 Performance game to test strange things and other").should(
-      "not.exist"
-    );
-  });
-
-  it("should not show unpublished game by default", () => {
-    cy.contains("2 Unpublished game").should("not.exist");
-  });
-
-  it("should only show the Perf game (1-9+ playerds) and not the Test game (2-4 players) when selecting 5-9 players range", () => {
-    // WARNING: this test is very fragile
-    // By clicking on .rc-slider, it will put the slider min value at the middle of the interval (5 for a 1-9 interval),
-    // which is what we need for this test.
-    // Be aware that, if the total range of the slide decreases (1-5) for example, clicking on it will trigger a min value of
-    // 3 (instead of the current 5), and this test will fail, as "0 Test game" will now appear.
-    // I didn't find any better way yet, as there is no pre-defined markup to be able to precisely select a given step of the slider.
-    cy.get(".rc-slider:first").click();
-    cy.contains("0 Test game").should("not.exist");
-    cy.contains("1 Performance game to test strange things and other").should(
-      "be.visible"
-    );
-  });
-});

+ 0 - 125
cypress/integration/item.spec.js

@@ -1,125 +0,0 @@
-describe("Item interactions", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      // eslint-disable-next-line quotes
-      "[]"
-    );
-    cy.visit("/");
-    cy.contains("0 Test game", { timeout: 10000 })
-      .parent()
-      .find(".img-wrapper")
-      .click();
-    // Wait board loading
-    cy.get(".board-pane", { timeout: 10000 }).should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11693, -11917)"
-    );
-    cy.get(".item")
-      .first()
-      .children()
-      .first()
-      .should("have.css", "transform", "none");
-  });
-
-  it("should move item", () => {
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .parent()
-      .should("have.css", "transform", "matrix(1, 0, 0, 1, 420, 400)");
-
-    // Select card
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .click(500, 500, { force: true });
-
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .trigger("pointerdown", {
-        buttons: 1,
-        clientX: 430,
-        clientY: 430,
-        force: true,
-        pointerId: 1,
-      });
-
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .trigger("pointermove", {
-        buttons: 1,
-        clientX: 530,
-        clientY: 530,
-        force: true,
-        pointerId: 1,
-      })
-      .trigger("pointerup", {
-        force: true,
-        pointerId: 1,
-      });
-
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .parent()
-      .should("have.css", "transform", "matrix(1, 0, 0, 1, 628, 608.5)");
-  });
-
-  it("should flip item", () => {
-    // Check before
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .siblings("img[src='/game_assets/Red_back.jpg']")
-      .should("have.css", "opacity", "0");
-    cy.get("img[src='/game_assets/JC.jpg']").should("have.css", "opacity", "1");
-
-    // Select card
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .click(500, 500, { force: true });
-
-    cy.get('[title = "Reveal/Hide (f)"]').click({ force: true });
-
-    // Check after
-    cy.get("img[src='/game_assets/JC.jpg']").should("have.css", "opacity", "0");
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .siblings("img[src='/game_assets/Red_back.jpg']")
-      .should("have.css", "opacity", "1");
-  });
-
-  it("should tap item", () => {
-    // Check before
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .should("have.css", "transform", "matrix(1, 0, 0, 1, 0, 0)");
-
-    // Select card
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .click(500, 500, { force: true });
-
-    cy.get('[title = "Tap/Untap (t)"]').click({ force: true });
-
-    // Check after
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .should(
-        "have.css",
-        "transform",
-        "matrix(6.12323e-17, 1, -1, 6.12323e-17, 0, 0)"
-      );
-  });
-
-  it("should hide menu", () => {
-    // Select card
-    cy.get("img[src='/game_assets/JC.jpg']").click(500, 500, { force: true });
-
-    cy.get("img[alt='Edit']").should("exist");
-
-    cy.get("img[alt='Hide menu']").click({ scrollBehavior: false });
-
-    cy.get("img[alt='Edit']").should("not.exist");
-  });
-});

+ 0 - 42
cypress/integration/message.spec.js

@@ -1,42 +0,0 @@
-describe("Messages interactions", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      "[]"
-    );
-    cy.visit("/");
-    cy.contains("0 Test game", { timeout: 10000 })
-      .parent()
-      .find(".img-wrapper")
-      .click();
-    // Way board loading
-    cy.get(".board-pane", { timeout: 10000 }).should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11693, -11917)"
-    );
-  });
-
-  it("Should show and hide message panel", () => {
-    cy.contains("Send").should("not.exist");
-    cy.get("img[alt^='Message']").click({ force: true });
-    cy.contains("Send");
-    cy.get(".side-panel.open [alt^='Close']").click();
-    cy.contains("Send").should("not.exist");
-  });
-
-  it("Should send message", () => {
-    cy.get("img[alt^='Message']").click({ force: true });
-
-    cy.get("input[placeholder^='Enter your message...']").type(
-      "What is the question?"
-    );
-    cy.contains("Send").click();
-
-    cy.contains("What is the question?");
-  });
-});

+ 0 - 74
cypress/integration/selection.spec.js

@@ -1,74 +0,0 @@
-describe("Selection action", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      "[]"
-    );
-    cy.visit("/");
-    cy.contains("0 Test game", { timeout: 10000 })
-      .parent()
-      .find(".img-wrapper")
-      .click();
-    // Way board loading
-    cy.get(".board-pane", { timeout: 10000 }).should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11693, -11917)"
-    );
-    cy.get(".item")
-      .first()
-      .children()
-      .first()
-      .should("have.css", "transform", "none");
-  });
-
-  it("should select multiple items with right click ", () => {
-    const posInit = {
-      clientX: 400,
-      clientY: 210,
-    };
-    cy.get(".board")
-      .trigger("pointerdown", {
-        buttons: 4,
-        pointerId: 1,
-        isPrimary: true,
-        scrollBehavior: false,
-        force: true,
-        ...posInit,
-      })
-      .trigger("pointermove", {
-        buttons: 4,
-        force: true,
-        pointerId: 1,
-        isPrimary: true,
-        scrollBehavior: false,
-        clientX: posInit.clientX + 300,
-        clientY: posInit.clientY + 250,
-      });
-
-    cy.get(".selection").should(
-      "have.css",
-      "transform",
-      "matrix(1, 0, 0, 1, 499.04, 275.04)"
-    );
-
-    cy.get(".board").trigger("pointerup", {
-      isPrimary: true,
-      force: true,
-    });
-
-    cy.get("img[src='/game_assets/AS.jpg']")
-      .parents(".item")
-      .should("have.class", "selected");
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .should("have.class", "selected");
-    cy.get("img[src='/game_assets/BH.jpg']")
-      .parents(".item")
-      .should("have.class", "selected");
-  });
-});

+ 0 - 86
cypress/integration/session.spec.js

@@ -1,86 +0,0 @@
-describe("Session management", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      // eslint-disable-next-line quotes
-      "[]"
-    );
-
-    cy.visit("/");
-
-    cy.contains("0 Test game", { timeout: 10000 })
-      .parent()
-      .find(".img-wrapper")
-      .click();
-
-    // Way board loading
-    cy.get(".board-pane", { timeout: 10000 }).should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11693, -11917)"
-    );
-    cy.get(".item")
-      .first()
-      .children()
-      .first()
-      .should("have.css", "transform", "none");
-  });
-
-  it("should autosave session", () => {
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .parent()
-      .should("have.css", "transform", "matrix(1, 0, 0, 1, 420, 400)");
-
-    cy.wait(300);
-
-    // Select card
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .click(500, 500, { force: true });
-
-    cy.intercept(
-      {
-        method: "POST",
-        url: "/airboardgame/store/session/*",
-      },
-      // eslint-disable-next-line quotes
-      (req) => {
-        expect(req.body).to.have.property("items");
-        req.reply(req.body);
-      }
-    ).as("postSession");
-
-    cy.wait(300);
-
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .trigger("pointerdown", {
-        buttons: 1,
-        clientX: 430,
-        clientY: 430,
-        force: true,
-        pointerId: 1,
-      });
-
-    cy.get("img[src='/game_assets/JC.jpg']")
-      .parents(".item")
-      .trigger("pointermove", {
-        buttons: 1,
-        clientX: 530,
-        clientY: 530,
-        force: true,
-        pointerId: 1,
-      })
-      .trigger("pointerup", {
-        force: true,
-        pointerId: 1,
-      });
-
-    cy.wait("@postSession");
-  });
-});

+ 0 - 215
cypress/integration/studio.spec.js

@@ -1,215 +0,0 @@
-describe("Studio", () => {
-  beforeEach(() => {
-    cy.viewport(1000, 600);
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/auth/check",
-      },
-      // eslint-disable-next-line quotes
-      '{"message":"success"}'
-    );
-
-    cy.intercept(
-      {
-        method: "GET",
-        url: "/airboardgame/store/game*",
-      },
-      // eslint-disable-next-line quotes
-      "[]"
-    );
-
-    cy.visit("/", {
-      onBeforeLoad: (win) => {
-        win.localStorage.setItem("isAuthenticated", "true");
-      },
-    });
-    cy.contains("Studio").click();
-  });
-
-  it("Can see add game button", () => {
-    cy.contains("Add a game");
-  });
-
-  it("Can access new game creation", () => {
-    cy.get("[title^='Add a game']").click();
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11500, -11700)"
-    );
-  });
-
-  it("Can create empty game", () => {
-    cy.get("[title^='Add a game']").click();
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11500, -11700)"
-    );
-
-    // save
-    cy.intercept(
-      {
-        method: "POST",
-        url: "/airboardgame/store/game/*",
-      },
-      // eslint-disable-next-line quotes
-      (req) => {
-        expect(req.body.items.length).to.equal(0);
-        req.reply(req.body);
-      }
-    );
-
-    cy.get("[title^='Save']").click();
-    cy.get("button").contains("Save").click();
-  });
-
-  it("Can create basic game", () => {
-    cy.get("[title^='Add a game']").click();
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11500, -11700)"
-    );
-    // Add an item
-    cy.get("[title^='Add an item']").click({ force: true });
-    cy.contains("Rectangle").parent().parent().click();
-    cy.get(".side-panel.open [alt^='Close']").click();
-
-    // save
-    cy.intercept(
-      {
-        method: "POST",
-        url: "/airboardgame/store/game/*",
-      },
-      // eslint-disable-next-line quotes
-      (req) => {
-        expect(req.body.items.length).to.equal(1);
-        expect(req.body.items[0].type).to.equal("rect");
-        req.reply(req.body);
-      }
-    );
-
-    cy.get("[title^='Save']").click();
-    cy.get("button").contains("Save").click();
-  });
-
-  it("Can edit game properties", () => {
-    cy.get("[title^='Add a game']").click({ force: true });
-    cy.get(".board-pane").should(
-      "have.css",
-      "transform",
-      "matrix(0.48, 0, 0, 0.48, -11500, -11700)"
-    );
-
-    // Edit title
-    cy.get("[title^='Configuration']").click({ force: true });
-    cy.get('input[name="defaultName"]').clear().type("ChangeGameName");
-    cy.get(".side-panel.open [alt^='Close']").click();
-
-    cy.contains("ChangeGameName");
-
-    cy.intercept(
-      {
-        method: "POST",
-        url: "/airboardgame/store/game/*",
-      },
-      // eslint-disable-next-line quotes
-      (req) => {
-        expect(req.body.board.defaultName).to.equal("ChangeGameName");
-        req.reply(req.body);
-      }
-    );
-
-    cy.get("[title^='Save']").click();
-    cy.get("button").contains("Save").click();
-  });
-
-  describe("Item edition", () => {
-    beforeEach(() => {
-      cy.get("[title^='Add a game']").click({ force: true });
-      cy.get(".board-pane").should(
-        "have.css",
-        "transform",
-        "matrix(0.48, 0, 0, 0.48, -11500, -11700)"
-      );
-      // Add an item
-      cy.get("[title^='Add an item']").click({ force: true });
-      cy.contains("Rectangle").parent().parent().click();
-      cy.get(".side-panel.open [alt^='Close']").click();
-    });
-
-    it("Can update item properties", () => {
-      cy.get(".item").click({ force: true });
-      cy.get("button img[alt^='Edit']").click({ force: true });
-
-      cy.get('input[name="width"]').clear().type("100");
-      cy.get('input[name="height"]').clear().type("75");
-      cy.get('input[name="text"]').clear().type("myCube");
-
-      cy.get(".item")
-        .children()
-        .first()
-        .should((elt) => {
-          const { clientWidth, clientHeight } = elt[0];
-          expect(clientWidth).to.equal(100);
-          expect(clientHeight).to.equal(75);
-        });
-
-      cy.get(".item").contains("myCube");
-    });
-
-    it("Can lock an item", () => {
-      cy.get(".item").click({ force: true });
-      cy.get("button img[alt^='Edit']").click({ force: true });
-
-      cy.get("input[name='locked']").click();
-
-      cy.get(".item").should("have.class", "locked");
-
-      cy.get(".board").click({
-        scrollBehavior: false,
-        force: true,
-      });
-
-      // cy.contains("New").click();
-
-      cy.get(".item").click({ force: true });
-
-      cy.get(".item").should("not.have.class", "selected");
-
-      cy.get(".item").dblclick({ force: true });
-
-      cy.contains("Hint");
-      cy.wait(1000);
-
-      // long press to unlock
-      cy.get(".item").trigger("pointerdown", { force: true });
-      cy.wait(1100);
-      cy.get(".item").trigger("pointerup", { force: true });
-
-      cy.get(".item").should("have.class", "selected");
-    });
-
-    it("Can change item layer", () => {
-      cy.get(".item").click({ force: true });
-      cy.get("button img[alt^='Edit']").click({ force: true });
-
-      cy.get(".item").parent().should("have.css", "z-index", "140");
-
-      cy.get(".slider-layer .rc-slider-mark-text").contains("-1").click();
-
-      cy.get(".item").parent().should("have.css", "z-index", "130");
-    });
-  });
-});
-
-/* TODO
-
-- rotation
-- layer
-- actions
-- Items
-
-*/

+ 0 - 21
cypress/plugins/index.js

@@ -1,21 +0,0 @@
-/// <reference types="cypress" />
-// ***********************************************************
-// This example plugins/index.js can be used to load plugins
-//
-// You can change the location of this file or turn off loading
-// the plugins file with the 'pluginsFile' configuration option.
-//
-// You can read more here:
-// https://on.cypress.io/plugins-guide
-// ***********************************************************
-
-// This function is called when a project is opened or re-opened (e.g. due to
-// the project's config changing)
-
-/**
- * @type {Cypress.PluginConfig}
- */
-module.exports = (on, config) => {
-  // `on` is used to hook into various events Cypress emits
-  // `config` is the resolved Cypress config
-}

+ 0 - 0
cypress/screenshots/.gitkeep


+ 0 - 25
cypress/support/commands.js

@@ -1,25 +0,0 @@
-// ***********************************************
-// This example commands.js shows you how to
-// create various custom commands and overwrite
-// existing commands.
-//
-// For more comprehensive examples of custom
-// commands please read more here:
-// https://on.cypress.io/custom-commands
-// ***********************************************
-//
-//
-// -- This is a parent command --
-// Cypress.Commands.add("login", (email, password) => { ... })
-//
-//
-// -- This is a child command --
-// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
-//
-//
-// -- This is a dual command --
-// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
-//
-//
-// -- This will overwrite an existing command --
-// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

+ 0 - 20
cypress/support/index.js

@@ -1,20 +0,0 @@
-// ***********************************************************
-// This example support/index.js is processed and
-// loaded automatically before your test files.
-//
-// This is a great place to put global configuration and
-// behavior that modifies Cypress.
-//
-// You can change the location of this file or turn off
-// automatically serving support files with the
-// 'supportFile' configuration option.
-//
-// You can read more here:
-// https://on.cypress.io/configuration
-// ***********************************************************
-
-// Import commands.js using ES2015 syntax:
-import './commands'
-
-// Alternatively you can use CommonJS syntax:
-// require('./commands')