From 1253e2388af161e536f0e43bad8c8da58b0109d2 Mon Sep 17 00:00:00 2001 From: Simon Priet Date: Mon, 6 Sep 2021 10:44:44 +0200 Subject: [PATCH] feat: :rocket: Created features for notifications and signin and stubbed them for automation. --- .vscode/launch.json | 21 +++++++++++++++ .../integration/inscription/inscription.js | 2 +- cypress/integration/notification.feature | 15 +++++++++++ .../integration/notification/notification.js | 27 +++++++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 cypress/integration/notification/notification.js diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..8ca64a84 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Utilisez IntelliSense pour en savoir plus sur les attributs possibles. + // Pointez pour afficher la description des attributs existants. + // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Test cypress", + "request": "launch", + "runtimeArgs": [ + "run-script", + "test" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "pwa-node" + } + ] +} \ No newline at end of file diff --git a/cypress/integration/inscription/inscription.js b/cypress/integration/inscription/inscription.js index e3262902..7be24695 100644 --- a/cypress/integration/inscription/inscription.js +++ b/cypress/integration/inscription/inscription.js @@ -11,7 +11,7 @@ describe("As a Trusker, when I subscribe, I am asked for a mobile phone number." }); Then("I have to provide a phone number", () => { - cy.log(""); + cy.expect(true).to.eq(true); }); }); diff --git a/cypress/integration/notification.feature b/cypress/integration/notification.feature index e69de29b..077b296e 100644 --- a/cypress/integration/notification.feature +++ b/cypress/integration/notification.feature @@ -0,0 +1,15 @@ +Feature: Receive text notification + + As a subscribed Trusker, I receive a text message when a collaborator send a new post in the thread. + + Scenario: Receive a text notification + Given I am connected + When a Trusker send a post + Then I receive a text message + + Scenario: Open the post from the text + Given I am connected + And I received a text message + When I open the link in the message + Then the app opens + And the app shows me the message \ No newline at end of file diff --git a/cypress/integration/notification/notification.js b/cypress/integration/notification/notification.js new file mode 100644 index 00000000..5dd58590 --- /dev/null +++ b/cypress/integration/notification/notification.js @@ -0,0 +1,27 @@ +/* global Given, When, Then */ +import { Given, When, Then, And } from "cypress-cucumber-preprocessor/steps"; + +describe("Receive a text notification", () => { + + Given("I am connected", () => { + cy.log(""); + }); + + When("a Trusker send a post", ()=> { + cy.log(""); + }); + + Then("I receive a text message", ()=>{ + cy.expect(true).to.eq(true); + }); + +}); + +describe("Open the post from the text", ()=> { + Given("I am connected"); + And("I received a text message"); + When("I open the link in the message"); + Then("the app opens"); + And("the app shows me the message"); + +}); \ No newline at end of file