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

CON-3045 Tests(DPxAI): Upload test for quest01 objects-around #2679

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

lotoussa
Copy link
Contributor

@lotoussa lotoussa commented Aug 8, 2024

https://01talent.atlassian.net/browse/CON-3045

-> the two last tests cannot work because the test declare the object called robot and the solution declare it also. So the subject should probably ask to search for name age and hasEnergy in another variable name than robot to avoid conflict.
Fixed

@lotoussa lotoussa added the 🧪 test Tests label Aug 8, 2024
@lotoussa lotoussa requested a review from Oumaimafisaoui August 8, 2024 01:01
@lotoussa lotoussa self-assigned this Aug 8, 2024
Copy link
Contributor

@Oumaimafisaoui Oumaimafisaoui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the new naming.

@lotoussa lotoussa requested a review from Oumaimafisaoui August 8, 2024 13:15
@Oumaimafisaoui Oumaimafisaoui requested a review from nprimo August 8, 2024 13:51
Copy link
Contributor

@nprimo nprimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests fail the provided solution here 01-edu/solutions#50 (even after the suggested change)

variable myRobot is declared and of type object: PASS
property name from myRobot is of type string: PASS
property age from myRobot is of type number: PASS
property hasEnergy from myRobot is of type boolean: PASS
all 3 variable should be defined and have the right values: FAIL

======= Error ======
 -> Expected values to be strictly deep-equal:
+ actual - expected

  {
+   age: 5,
+   hasEnergy: true,
+   name: 'RoboMax'
-   age: 27,
-   hasEnergy: false,
-   name: 'Freddy'
  }


======= Code =======
// Provided setup
let robot = {
  name: 'Freddy',
  age: 27,
  hasEnergy: false,
}

// Your code
let myRobot = {
  name: 'RoboMax',
  age: 5,
  hasEnergy: true,
}

let name = myRobot.name
let age = myRobot.age
let hasEnergy = myRobot.hasEnergy;

// The tests
equal({ name, age, hasEnergy }, robot);

@lotoussa
Copy link
Contributor Author

@nprimo the solution PR is not updated yet, i will push a commit with the correct version
the failed solution you showed us doesn't fit the subject i think. You declare myRobot, and then you select value from myRobot but we should select value from robot.
it's 2 independant tasks.
if you think it's confusing we can think of other variable name.

exemple of the code i'll push to the solution file :

let myRobot = {
    name: "RoboMax",
    age: 5,
    hasEnergy: true,
};

let name = robot.name;
let age = robot.age;
let hasEnergy = robot.hasEnergy;

variable myRobot is declared and of type object: PASS
property name from myRobot is of type string: PASS
property age from myRobot is of type number: PASS
property hasEnergy from myRobot is of type boolean: PASS
all 3 variable should be defined and have the right values: PASS
value should also work for Jean-Pierre: PASS

@lotoussa lotoussa changed the title CON-3045 Tests(DPxAI): WIP Upload test for quest01 objects-around CON-3045 Tests(DPxAI): Upload test for quest01 objects-around Aug 13, 2024
@Oumaimafisaoui Oumaimafisaoui requested a review from nprimo August 19, 2024 15:07
Copy link
Contributor

@Oumaimafisaoui Oumaimafisaoui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Oumaimafisaoui Oumaimafisaoui merged commit 52dc2a6 into master Aug 30, 2024
3 checks passed
@Oumaimafisaoui Oumaimafisaoui deleted the CON-3045-test-d-px-ai-quest-01-objects-around branch August 30, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants