Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lara f mz #88

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading