{"id":929,"date":"2023-05-08T16:09:14","date_gmt":"2023-05-08T08:09:14","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=929"},"modified":"2023-05-08T16:09:16","modified_gmt":"2023-05-08T08:09:16","slug":"tough-in-handling-a-test-case","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/","title":{"rendered":"Tough in handling a test case"},"content":{"rendered":"\n<p>Hello everyone, I hope you are doing well out there. It is time for my weekly task update. It is continue for my last week task which is writing a Test Suite. For this week, I have been focusing on make a correction for scanning of correct code should navigate back to list view. <\/p>\n\n\n\n<p>Firstly, like I mention before this I have been handling with the scanning a correct location code should navigate back to the list view. For this test case it is not that quite challenging but throughout writing and make a correction for this test case I have been deal with several issues and errors. Like the past week, for this test case I have been dealing with the function or method issue. But after few tries and error, I managed to solve the issue by mock it. I use jest function to mock it and the issue is resolved after the mock implementation in the test case. <\/p>\n\n\n\n<p>Furthermore, I run and debug the test case to make sure there is no other issues and errors. New issues are pop up after the running and debugging the test case. For this issue it involved the sound library. This issue really make me feel blank because I have been explore and also refer another file to solve it. After several try and error the issue did not resolve. After that I ask Peter for some help and code review. At first we also take some time to solve the sound issue. It is because the value in the test id is null. We also tried several method in order to make the input element editable. But in the end the value is still null after debugging it. <\/p>\n\n\n\n<p>Overall, this week is not easy for me. I hope next week I manage to make the test suite pass. I also thankful for the opportunity to learn from Peter and helping me throughout on writing this test suite. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone, I hope you are doing well out there. It is time for my weekly task update. It is continue for my last week task which is writing a Test Suite. For this week, I have been focusing on make a correction for scanning of correct code should navigate back to list view. Firstly, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Tough in handling a test case&#8221;<\/span><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tough in handling a test case | Tong Hin&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tough in handling a test case | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Hello everyone, I hope you are doing well out there. It is time for my weekly task update. It is continue for my last week task which is writing a Test Suite. For this week, I have been focusing on make a correction for scanning of correct code should navigate back to list view. Firstly, &hellip; Continue reading &quot;Tough in handling a test case&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-08T08:09:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-08T08:09:16+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\",\"name\":\"Tough in handling a test case | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2023-05-08T08:09:14+00:00\",\"dateModified\":\"2023-05-08T08:09:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/\",\"name\":\"Tough in handling a test case\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/79d8f91ef86c423bba6bdd84fdc83dae\"},\"headline\":\"Tough in handling a test case\",\"datePublished\":\"2023-05-08T08:09:14+00:00\",\"dateModified\":\"2023-05-08T08:09:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2023\/05\/08\/tough-in-handling-a-test-case\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/79d8f91ef86c423bba6bdd84fdc83dae\",\"name\":\"Haqeem\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b857db16b9657c53c00b6c4185e9460?s=96&d=mm&r=g\",\"caption\":\"Haqeem\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/929"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=929"}],"version-history":[{"count":4,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/929\/revisions"}],"predecessor-version":[{"id":948,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/929\/revisions\/948"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}