Skip to content

Commit

Permalink
Made Starfleet address the "unusual" recycle for challenge
Browse files Browse the repository at this point in the history
(makes juice-shop#809 a bit more intuitive and resolves juice-shop#451)
  • Loading branch information
bkimminich committed Feb 23, 2019
1 parent be267ba commit 48cce6c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions data/datacreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,21 +307,21 @@ function createComplaints () {
function createRecycleItems () {
const recycleItems = [
{
id: 33,
UserId: 3,
quantity: 1320,
address: '22/7 Winston Street, Sydney, Australia, Earth',
date: '2006-01-14',
isPickup: true
},
{
id: 368,
id: 42,
UserId: 2,
quantity: 800,
address: 'Starfleet HQ, 24-593 Federation Drive, San Francisco, CA',
date: '2270-01-17',
isPickup: true
},
{
id: 698,
UserId: 3,
quantity: 1320,
address: '22/7 Winston Street, Sydney, Australia, Earth',
date: '2006-01-14',
isPickup: true
},
{
UserId: 4,
quantity: 120,
Expand Down
2 changes: 1 addition & 1 deletion routes/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ exports.databaseRelatedChallenges = () => (req, res, next) => {
function recyclesMissingItemChallenge () {
models.Feedback.findAndCountAll({
where: {
comment: { [Op.like]: '%22/7 Winston Street, Sydney, Australia, Earth%' }
comment: { [Op.like]: '%Starfleet HQ, 24-593 Federation Drive, San Francisco, CA%' }
}
}).then(({ count }) => {
if (count > 0) {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/contactSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ describe('/#/contact', () => {

describe('challenge "recyclesMissingItemChallenge"', () => {
it('should be possible to post the address of the lost product as feedback', () => {
comment.sendKeys('22/7 Winston Street, Sydney, Australia, Earth')
comment.sendKeys('Starfleet HQ, 24-593 Federation Drive, San Francisco, CA')
rating.click()
submitButton.click()
})
protractor.expect.challengeSolved({ challenge: 'Recycle Missing Item Challenge' })
protractor.expect.challengeSolved({ challenge: 'Lost in Recycling' })
})

function solveNextCaptcha () {
Expand Down

0 comments on commit 48cce6c

Please sign in to comment.