{"size": 1103, "ext": "js", "max_stars_repo_path": "e2e/Review_restaurant.spec.js", "max_stars_repo_name": "ra-md/explore-resto-submission-3", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "e2e/Review_restaurant.spec.js", "max_issues_repo_name": "ra-md/explore-resto-submission-3", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "e2e/Review_restaurant.spec.js", "max_forks_repo_name": "ra-md/explore-resto-submission-3", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.575, "max_line_length": 115, "alphanum_fraction": 0.6636446056}
Feature('Review restaurant');

Scenario('should show "nama dan review harus diisi!" when the name and review values are empty', async ({ I }) => {
  await I.clickTheFirstRestaurant();

  I.fillAndSubmitTheReview({ name: '', review: '' });

  I.see('nama dan review harus diisi!', '.review-message');
});

Scenario('should show "nama harus diisi!" when the name value is empty', async ({ I }) => {
  await I.clickTheFirstRestaurant();

  I.fillAndSubmitTheReview({ name: '', review: 'Test123' });

  I.see('nama harus diisi!', '.review-message');
});

Scenario('should show "review harus diisi!" when the review value is empty', async ({ I }) => {
  await I.clickTheFirstRestaurant();

  I.fillAndSubmitTheReview({ name: 'Test', review: '' });

  I.see('review harus diisi!', '.review-message');
});

Scenario('Review a restaurant', ({ I }) => {
  I.clickTheFirstRestaurant();

  const reviewTest = {
    name: 'Test',
    review: 'Test1 23',
  };

  I.fillAndSubmitTheReview(reviewTest);

  I.see(reviewTest.name, '.consumer-reviews__name');
  I.see(reviewTest.review, '.consumer-reviews__review');
});
