Skip to content

Commit

Permalink
Merge pull request #88 from Arquisoft/LaraFMz
Browse files Browse the repository at this point in the history
Lara f mz
  • Loading branch information
uo276026 authored Apr 8, 2024
2 parents 7050a41 + c61ea25 commit 6d2de36
Show file tree
Hide file tree
Showing 10 changed files with 19,443 additions and 41,225 deletions.
2,935 changes: 2,838 additions & 97 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"jest": "^29.7.0"
},
"dependencies": {
"path-browserify": "^1.0.1"
"docker": "^1.0.0",
"path-browserify": "^1.0.1",
"start-server-and-test": "^2.0.3"
}
}
162 changes: 162 additions & 0 deletions questionservice/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions questionservice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"setprototypeof": "^1.2.0",
"side-channel": "^1.0.6",
"statuses": "^2.0.1",
"supertest": "^6.3.4",
"toidentifier": "^1.0.1",
"type-is": "^1.6.18",
"unpipe": "^1.0.0",
Expand Down
16 changes: 16 additions & 0 deletions questionservice/server.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const request = require('supertest');
const axios = require('axios');
const app = require('./server');
const fs = require('fs');

describe('GET /pregunta', () => {
it('debería devolver una pregunta y respuestas con éxito', async () => {
const response = await request(app).get('/pregunta');
expect(response.statusCode).toBe(200);
expect(response.body).toHaveProperty('question');
expect(response.body).toHaveProperty('answerGood');
expect(response.body).toHaveProperty('answers');
expect(response.body.answers).toHaveLength(4);
});

});
2 changes: 1 addition & 1 deletion webapp/e2e/steps/home.steps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const puppeteer = require('puppeteer');
const { defineFeature, loadFeature }=require('jest-cucumber');
const setDefaultOptions = require('expect-puppeteer').setDefaultOptions
const feature = loadFeature('../features/home.feature');
const feature = loadFeature('./features/home.feature');

let page;
let browser;
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/login.steps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const puppeteer = require('puppeteer');
const { defineFeature, loadFeature }=require('jest-cucumber');
const setDefaultOptions = require('expect-puppeteer').setDefaultOptions
const feature = loadFeature('../features/login.feature');
const feature = loadFeature('./features/login.feature');

let page;
let browser;
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/register-form.steps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const puppeteer = require('puppeteer');
const { defineFeature, loadFeature }=require('jest-cucumber');
const setDefaultOptions = require('expect-puppeteer').setDefaultOptions
const feature = loadFeature('../features/register-form.feature');
const feature = loadFeature('./features/register-form.feature');

let page;
let browser;
Expand Down
Loading

0 comments on commit 6d2de36

Please sign in to comment.