Skip to content

Commit 117598f

Browse files
committed
docs: sprint review
1 parent 3a18951 commit 117598f

10 files changed

+382
-361
lines changed

mdr/config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export default {
1919
/**
2020
* That long string from mlab
2121
*/
22-
databaseURL: process.env.MONGODB_URI || 'mongodb://127.0.0.1:27017/test',
23-
// databaseURL: process.env.MONGODB_URI || 'mongodb+srv://root:iJwu80jbwERuTa4t@maincluster.ocd2dr6.mongodb.net/?retryWrites=true&w=majority',
22+
// databaseURL: process.env.MONGODB_URI || 'mongodb://127.0.0.1:27017/test',
23+
databaseURL: process.env.MONGODB_URI || 'mongodb+srv://root:iJwu80jbwERuTa4t@maincluster.ocd2dr6.mongodb.net/?retryWrites=true&w=majority',
2424

2525
/**
2626
*/

mdv/src/user_interface.ts

+111-33
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ export default class UserInterface extends GUI {
99
constructor(private thumbRaiser: ThumbRaiser, private loader: Loader) {
1010
super()
1111

12-
const audioCallback = function (enabled: boolean) {
12+
const audioCallback = function(enabled: boolean) {
1313
if (!enabled) {
1414
thumbRaiser.audio.stopAll()
1515
}
1616
}
1717

18-
const textureCallback = function (options, name) {
18+
const textureCallback = function(options, name) {
1919
thumbRaiser.cubeTexture = new CubeTexture(
2020
thumbRaiser.cubeTexturesParameters.skyboxes[options.indexOf(name)],
2121
)
2222
thumbRaiser.buildCreditsPanel()
2323
}
2424

25-
const createEmoteCallback = function (animations, name) {
26-
callbacks[name] = function () {
25+
const createEmoteCallback = function(animations, name) {
26+
callbacks[name] = function() {
2727
animations.fadeToAction(name, 0.2)
2828
}
2929
emotesFolder.add(callbacks, name)
3030
}
3131

32-
const positionCallback = function (light, distance, orientation) {
32+
const positionCallback = function(light, distance, orientation) {
3333
const position = light.orientationToPosition(distance, orientation)
3434
light.position.set(position.x, position.y, position.z)
3535
}
@@ -57,7 +57,7 @@ export default class UserInterface extends GUI {
5757
const options = {
5858
building: [],
5959
floor: [],
60-
Travel: function () {
60+
Travel: function() {
6161
const building = optionsBuildings.getValue()
6262
const floor = optionsFloors.getValue()
6363
if (newMap !== '' && building && floor) {
@@ -109,7 +109,7 @@ export default class UserInterface extends GUI {
109109
x1: 0, y1: 0, // Coordinates for the first floor
110110
x2: 0, y2: 0, // Coordinates for the second floor
111111

112-
Simulate: function () {
112+
Simulate: function() {
113113
const b1 = optionsBuildings1.getValue()
114114
const b2 = optionsBuildings2.getValue()
115115
const f1 = optionsFloors1.getValue()
@@ -164,6 +164,20 @@ export default class UserInterface extends GUI {
164164
x: 4,
165165
y: 18
166166
},
167+
{
168+
type: 'cell',
169+
building: 'A',
170+
floor: 1,
171+
x: 4,
172+
y: 19
173+
},
174+
{
175+
type: 'cell',
176+
building: 'A',
177+
floor: 1,
178+
x: 4,
179+
y: 20
180+
},
167181
{
168182
type: 'cell',
169183
building: 'A',
@@ -175,65 +189,128 @@ export default class UserInterface extends GUI {
175189
type: 'elevator',
176190
frombuilding: 'A',
177191
fromfloor: 1,
192+
tobuilding: 'A',
193+
tofloor: 2,
194+
},
195+
{
196+
type: 'cell',
197+
building: 'A',
198+
floor: 2,
199+
x: 1,
200+
y: 20
201+
},
202+
{
203+
type: 'cell',
204+
building: 'A',
205+
floor: 2,
206+
x: 2,
207+
y: 20
208+
},
209+
{
210+
type: 'cell',
211+
building: 'A',
212+
floor: 2,
213+
x: 3,
214+
y: 20
215+
},
216+
{
217+
type: 'cell',
218+
building: 'A',
219+
floor: 2,
220+
x: 4,
221+
y: 20
222+
},
223+
{
224+
type: 'cell',
225+
building: 'A',
226+
floor: 2,
227+
x: 4,
228+
y: 21
229+
},
230+
{
231+
type: 'elevator',
232+
frombuilding: 'A',
233+
fromfloor: 2,
178234
tobuilding: 'B',
179-
tofloor: 1,
235+
tofloor: 2,
180236
},
181237
{
182238
type: 'cell',
183239
building: 'B',
184-
floor: 1,
185-
x: 6,
186-
y: 19
240+
floor: 2,
241+
x: 4,
242+
y: 1
187243
},
188244
{
189245
type: 'cell',
190246
building: 'B',
191-
floor: 1,
247+
floor: 2,
192248
x: 5,
193-
y: 18
249+
y: 1
194250
},
195251
{
196252
type: 'cell',
197253
building: 'B',
198-
floor: 1,
199-
x: 5,
200-
y: 17
254+
floor: 2,
255+
x: 6,
256+
y: 1
257+
},
258+
{
259+
type: 'cell',
260+
building: 'B',
261+
floor: 2,
262+
x: 7,
263+
y: 1
264+
},
265+
{
266+
type: 'cell',
267+
building: 'B',
268+
floor: 2,
269+
x: 8,
270+
y: 1
271+
},
272+
{
273+
type: 'cell',
274+
building: 'B',
275+
floor: 2,
276+
x: 8,
277+
y: 2
201278
},
202279

203280
{
204281
type: 'cell',
205282
building: 'B',
206-
floor: 1,
207-
x: 5,
208-
y: 16
283+
floor: 2,
284+
x: 8,
285+
y: 3
209286
},
210287
{
211288
type: 'cell',
212289
building: 'B',
213-
floor: 1,
214-
x: 4,
215-
y: 16
290+
floor: 2,
291+
x: 8,
292+
y: 4
216293
},
217294
{
218295
type: 'cell',
219296
building: 'B',
220-
floor: 1,
221-
x: 4,
222-
y: 15
297+
floor: 2,
298+
x: 8,
299+
y: 6
223300
},
224301
{
225302
type: 'cell',
226303
building: 'B',
227-
floor: 1,
228-
x: 4,
229-
y: 14
304+
floor: 2,
305+
x: 7,
306+
y: 6
230307
},
231308
{
232309
type: 'cell',
233310
building: 'B',
234-
floor: 1,
235-
x: 4,
236-
y: 13
311+
floor: 2,
312+
x: 6,
313+
y: 6
237314
},
238315
{
239316
type: 'cell',
@@ -250,6 +327,7 @@ export default class UserInterface extends GUI {
250327
y: 11
251328
},
252329
];
330+
253331
if (b1 && b2 && f1 && f2) {
254332
thumbRaiser.simulate(examplePath)
255333
}
@@ -269,8 +347,8 @@ export default class UserInterface extends GUI {
269347
options2.x1 = 0
270348
options2.y1 = 0
271349
});
272-
autFolder.add(options2, 'x1', 0, 30,1)
273-
autFolder.add(options2, 'y1', 0, 30,1)
350+
autFolder.add(options2, 'x1', 0, 30, 1)
351+
autFolder.add(options2, 'y1', 0, 30, 1)
274352
const optionsBuildings2 = autFolder.add(options2, 'building1', buildings)
275353
const optionsFloors2 = autFolder.add(options2, 'floor1', floors2)
276354
optionsBuildings2.onChange((val: string) => {

spa/cypress/e2e/delete-client.cy.ts

+55-55
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
function loginViaAuth0Ui(username: string, password: string) {
2-
cy.origin(
3-
Cypress.env('auth_domain'),
4-
{ args: { username, password } },
5-
({ username, password }) => {
6-
cy.get('input#1-email').type(username)
7-
cy.get('input#1-password').type(password, { log: false })
8-
cy.get('button[type="submit"]')
9-
.should('be.visible')
10-
.should('contain.text', 'Log In')
11-
.should('not.be.disabled')
12-
.should('not.be.hidden')
13-
.click()
14-
},
15-
)
16-
}
1+
// function loginViaAuth0Ui(username: string, password: string) {
2+
// cy.origin(
3+
// Cypress.env('auth_domain'),
4+
// { args: { username, password } },
5+
// ({ username, password }) => {
6+
// cy.get('input#1-email').type(username)
7+
// cy.get('input#1-password').type(password, { log: false })
8+
// cy.get('button[type="submit"]')
9+
// .should('be.visible')
10+
// .should('contain.text', 'Log In')
11+
// .should('not.be.disabled')
12+
// .should('not.be.hidden')
13+
// .click()
14+
// },
15+
// )
16+
// }
1717

18-
describe('Delete client Form e2e tests', () => {
19-
beforeEach(() => {
20-
window.localStorage.setItem('USER_ROLES', 'CLT')
21-
cy.visit('/delete-client')
18+
// describe('Delete client Form e2e tests', () => {
19+
// beforeEach(() => {
20+
// window.localStorage.setItem('USER_ROLES', 'CLT')
21+
// cy.visit('/delete-client')
2222

23-
const log = Cypress.log({
24-
displayName: 'AUTH0 LOGIN',
25-
message: [`🔐 Authenticating | ${Cypress.env('auth_username')}`],
26-
// @ts-ignore
27-
autoEnd: false,
28-
})
29-
log.snapshot('before')
23+
// const log = Cypress.log({
24+
// displayName: 'AUTH0 LOGIN',
25+
// message: [`🔐 Authenticating | ${Cypress.env('auth_username')}`],
26+
// // @ts-ignore
27+
// autoEnd: false,
28+
// })
29+
// log.snapshot('before')
3030

31-
loginViaAuth0Ui(Cypress.env('auth_username'), Cypress.env('auth_password'))
31+
// loginViaAuth0Ui(Cypress.env('auth_username'), Cypress.env('auth_password'))
3232

33-
log.snapshot('after')
34-
log.end()
35-
})
33+
// log.snapshot('after')
34+
// log.end()
35+
// })
3636

37-
it('has the correct title', () => {
38-
cy.title().should('equal', 'Delete Client')
39-
})
37+
// it('has the correct title', () => {
38+
// cy.title().should('equal', 'Delete Client')
39+
// })
4040

41-
it('should delete the client account', () => {
42-
cy.intercept('POST', 'http://localhost:4000/api/clients', {
43-
statusCode: 201,
44-
body: {
45-
name: 'quim',
46-
email: 'e2e-testing@isep.ipp.pt',
47-
phoneNumber: '123719765',
48-
vatNumber: '123189763',
49-
password: 'Passw0rd!T',
50-
},
51-
}).as('createClient')
41+
// it('should delete the client account', () => {
42+
// cy.intercept('POST', 'http://localhost:4000/api/clients', {
43+
// statusCode: 201,
44+
// body: {
45+
// name: 'quim',
46+
// email: 'e2e-testing@isep.ipp.pt',
47+
// phoneNumber: '123719765',
48+
// vatNumber: '123189763',
49+
// password: 'Passw0rd!T',
50+
// },
51+
// }).as('createClient')
5252

53-
const email = 'e2e-testing@isep.ipp.pt'
53+
// const email = 'e2e-testing@isep.ipp.pt'
5454

55-
cy.intercept('DELETE', 'http://localhost:4000/clients/e2e-testing@isep.ipp.pt', {
56-
statusCode: 201,
57-
body: {
58-
email: email,
59-
},
60-
}).as('deleteClient')
55+
// cy.intercept('DELETE', 'http://localhost:4000/clients/e2e-testing@isep.ipp.pt', {
56+
// statusCode: 201,
57+
// body: {
58+
// email: email,
59+
// },
60+
// }).as('deleteClient')
6161

62-
cy.get('button[type="submit"]').click()
63-
})
64-
})
62+
// cy.get('button[type="submit"]').click()
63+
// })
64+
// })

0 commit comments

Comments
 (0)