{"id":354017,"date":"2024-05-20T22:39:57","date_gmt":"2024-05-20T22:39:57","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=354017"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=354017","title":{"rendered":"<span>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f BDD \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 Playwright<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u00a0\u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e \u043f\u043e\u0434\u0445\u043e\u0434 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Behavior-driven_development\" rel=\"noopener noreferrer nofollow\">Behavior Driven Development (BDD)<\/a> \u0434\u043b\u044f\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f end\u2011to\u2011end \u0442\u0435\u0441\u0442\u043e\u0432. \u0425\u043e\u0442\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u044f \u0441\u043a\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u043b\u0441\u044f \u043a <em>Given\u2011When\u2011Then<\/em> \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0443, \u0442\u0435\u043f\u0435\u0440\u044c \u0447\u0430\u0441\u0442\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u00a0\u2014 \u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u00a0\u043f\u0438\u0448\u0443 BDD\u2011\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u0438\u0445 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/chat.openai.com\/\" rel=\"noopener noreferrer nofollow\">ChatGPT<\/a>.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c AI-\u0442\u0435\u0441\u0442\u044b \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/playwright.dev\/\" rel=\"noopener noreferrer nofollow\">Playwright<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/573\/351\/e19\/573351e1964bc5c4fe5df53162533a98.png\" alt=\"AI \u043f\u0438\u0448\u0435\u0442 \u0442\u0435\u0441\u0442\u044b\" title=\"AI \u043f\u0438\u0448\u0435\u0442 \u0442\u0435\u0441\u0442\u044b\" width=\"1000\" height=\"419\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/573\/351\/e19\/573351e1964bc5c4fe5df53162533a98.png\"\/><\/p>\n<div><figcaption>AI \u043f\u0438\u0448\u0435\u0442 \u0442\u0435\u0441\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f\u00a0\u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/demo.playwright.dev\/todomvc\/\" rel=\"noopener noreferrer nofollow\">TodoList<\/a>, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 Playwright. \u042d\u0442\u043e \u0432\u0435\u0431\u2011\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u00a0\u0441\u0442\u0430\u0442\u0443\u0441\u0443. \u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0446\u0435\u043b\u044c\u00a0\u2014 \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 end\u2011to\u2011end \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043a\u043e\u0434\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0440\u0430\u0431\u043e\u0442\u044b ChatGPT. \u0412\u00a0\u0438\u0434\u0435\u0430\u043b\u0435 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0435\u0437\u00a0\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a. \u041d\u0438\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dba\/80e\/f89\/dba80ef89602998141f6fc41e108f575.png\" alt=\"TodoList\" title=\"TodoList\" width=\"500\" height=\"308\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dba\/80e\/f89\/dba80ef89602998141f6fc41e108f575.png\"\/><\/p>\n<div><figcaption>TodoList<\/figcaption><\/div>\n<\/figure>\n<h2>\u041f\u043b\u0430\u043d<\/h2>\n<p>\u0410 \u043c\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f (user story)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u043e\u0433<\/p>\n<\/li>\n<\/ol>\n<h2>1. \u0421\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f (user story)<\/h2>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f (user story) \u2014 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 BDD. \u042d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0446\u0435\u043b\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f TodoList \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>As a user I want to manage items in todo list:  create items, complete items and filter to see only completed items.<\/code><\/pre>\n<p><em>\u0412\u0441\u0435 \u0442\u0435\u043a\u0441\u0442\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0432 ChatGPT, \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c <\/em>\u2014<em> \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430.<\/em><\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a ChatGPT.<\/p>\n<h2>2. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432<\/h2>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0448\u0430\u0433\u0430 (step definition) \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>Given I open TodoApp page<\/code><\/pre>\n<p>\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430:<\/p>\n<pre><code class=\"typescript\">await page.goto('https:\/\/demo.playwright.dev\/todomvc\/');<\/code><\/pre>\n<p>\u0418\u043b\u0438<\/p>\n<pre><code>When I click the button<\/code><\/pre>\n<p>\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f:<\/p>\n<pre><code class=\"typescript\">await page.getByTestId('button').click();<\/code><\/pre>\n<p>\u041d\u0430\u0431\u043e\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u0448\u0430\u0433\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 <a href=\"https:\/\/playwright.dev\/docs\/pom\" rel=\"noopener noreferrer nofollow\">Page Object Model<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 <code>TodoPage<\/code> \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0448\u0430\u0433\u043e\u0432 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b HTML, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443. \u041d\u043e&#8230; ChatGPT \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 TypeScript \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <a href=\"https:\/\/github.com\/microsoft\/playwright\" rel=\"noopener noreferrer nofollow\">@playwright\/test<\/a> \u0438 <a href=\"https:\/\/github.com\/vitalets\/playwright-bdd\" rel=\"noopener noreferrer nofollow\">playwright-bdd<\/a> \u2014 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 Playwright.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441<\/strong> \u043a ChatGPT \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>TodoPage<\/code> :<\/p>\n<pre><code>Create Page Object Model 'TodoPage' in Typescript for the following feature:  As a user I want to manage items in todo list:  create items, complete items and filter to see only completed items.  * Use page from '@playwright\/test' as constructor parameter. * Use Given, When, Then from 'playwright-bdd\/decorators' as BDD decorators, for example: @Given('pattern {string}'). * Don't fill methods body.<\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0447\u0430\u0442 \u0438 \u0436\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041c\u0435\u043d\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0433\u0438\u043f\u043d\u043e\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0432\u0442\u043e-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 ?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e89\/5e4\/704\/e895e47042001d15108bf823471368a8.gif\" alt=\"Generate\" title=\"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f Page Object Model \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT\" width=\"600\" height=\"433\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e89\/5e4\/704\/e895e47042001d15108bf823471368a8.gif\"\/><\/p>\n<div><figcaption>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f Page Object Model \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 ChatGPT<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { Page } from '@playwright\/test'; import { Given, When, Then } from 'playwright-bdd\/decorators';  export class TodoPage {   private page: Page;    constructor(page: Page) {     this.page = page;   }    @Given('I am on the Todo page')   async navigateToTodoPage() {     \/\/ Implement navigation to the Todo page here   }    @When('I create a new todo item with text {string}')   async createTodoItem(text: string) {     \/\/ Implement creating a new todo item here   }    @When('I complete the todo item with text {string}')   async completeTodoItem(text: string) {     \/\/ Implement completing a todo item here   }    @When('I filter to see only completed items')   async filterCompletedItems() {     \/\/ Implement filtering completed items here   }    @Then('I should see the todo item with text {string}')   async verifyTodoItemVisible(text: string) {     \/\/ Implement verification logic here   }    @Then('I should not see the todo item with text {string}')   async verifyTodoItemNotVisible(text: string) {     \/\/ Implement verification logic here   }    @Then('I should see only completed todo items')   async verifyOnlyCompletedItemsVisible() {     \/\/ Implement verification logic here   }    @Then('I should see all todo items')   async verifyAllItemsVisible() {     \/\/ Implement verification logic here   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u043e: ChatGPT \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u043e\u043c\u0435\u0442\u0438\u043b \u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u043a\u0438\u043d\u0443\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0445\u043e\u0447\u0443 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0412\u043c\u0435\u0441\u0442\u043e 4-\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0446\u0435\u043b\u0438\u043a\u043e\u043c. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439. \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0447\u0430\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p><strong>\u0423\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<pre><code>Replace all verify methods with single method that verifies list of visible items<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 ChatGPT (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { Page } from '@playwright\/test'; import { Given, When, Then } from 'playwright-bdd\/decorators';  export class TodoPage {   private page: Page;    constructor(page: Page) {     this.page = page;   }    @Given('I am on the Todo page')   async navigateToTodoPage() {     \/\/ Implement navigation to the Todo page here   }    @When('I create a new todo item with text {string}')   async createTodoItem(text: string) {     \/\/ Implement creating a new todo item here   }    @When('I complete the todo item with text {string}')   async completeTodoItem(text: string) {     \/\/ Implement completing a todo item here   }    @When('I filter to see only completed items')   async filterCompletedItems() {     \/\/ Implement filtering completed items here   }    @Then('I should see the following todo items:')   async verifyTodoItemsVisible(itemList: string[]) {     for (const itemText of itemList) {       \/\/ Implement verification logic for each itemText here     }   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e. ChatGPT \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u043c\u0438.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 ChatGPT, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043b\u0443\u0447\u0448\u0435 \u043b\u0438 \u0445\u0443\u0436\u0435. \u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0451\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0438\u0441\u0442\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u044f\u0445. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442:<\/p>\n<ul>\n<li>\n<p><code>make all methods async<\/code> \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 ChatGPT \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/p>\n<\/li>\n<li>\n<p><code>use {string} for string pattern parameters<\/code> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441 <a href=\"https:\/\/github.com\/cucumber\/cucumber-expressions\" rel=\"noopener noreferrer nofollow\">Cucumber Expression<\/a> \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p><code>create todo items inside scenario \"xxx\"<\/code> \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b<\/p>\n<\/li>\n<li>\n<p><code>don't start method names with given\/when\/then<\/code> \u2014 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0445 \u0438\u043c\u0451\u043d \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. ChatGPT, \u043a\u0430\u043a \u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u0441\u0442\u0430\u043b\u043e:<\/p>\n<ol>\n<li>\n<p>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 <code>TodoPage<\/code> \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e, \u0442.\u043a. \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<h3>2.1 \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0438\u0437\u0443\u0447\u0430\u044f HTML-\u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041d\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u2014 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043a\u043e\u0434\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, Playwright \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/playwright.dev\/docs\/codegen\" rel=\"noopener noreferrer nofollow\">codegen<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439  \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>\u0420\u0435\u0436\u0438\u043c codegen \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b:<\/p>\n<pre><code>npx playwright codegen https:\/\/demo.playwright.dev\/todomvc<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c URL \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ol>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c96\/4f6\/887\/c964f6887c68853833aaa01f86a87807.gif\" alt=\"steps in browser\" title=\"\u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b \u043f\u043e\u0434 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u043e\u043c codegen\" width=\"600\" height=\"556\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c96\/4f6\/887\/c964f6887c68853833aaa01f86a87807.gif\"\/><\/p>\n<div><figcaption>\u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b \u043f\u043e\u0434 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u043e\u043c codegen<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"typescript\">test('test', async ({ page }) => {   await page.goto('https:\/\/demo.playwright.dev\/todomvc\/#\/');   await page.getByPlaceholder('What needs to be done?').fill('feed the dog');   await page.getByPlaceholder('What needs to be done?').press('Enter');   await page.getByPlaceholder('What needs to be done?').fill('feed the cat');   await page.getByPlaceholder('What needs to be done?').press('Enter');   await page.locator('li').filter({ hasText: 'feed the cat' }).getByLabel('Toggle Todo').check();   await page.getByRole('link', { name: 'Completed' }).click(); });<\/code><\/pre>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0442 ChatGPT.<\/p>\n<p>\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0440\u0443\u0447\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a \u043d\u0435 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 DOM \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440 <code>page.locator('li')<\/code> \u044f \u0437\u0430\u043c\u0435\u043d\u044e \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 <code>page.getByTestId('todo-title')<\/code>.<\/p>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>TodoPage<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>TodoPage.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { Page, expect } from '@playwright\/test'; import { Given, When, Then, Fixture } from 'playwright-bdd\/decorators'; import { DataTable } from '@cucumber\/cucumber';  export @Fixture('todoPage') class TodoPage {   private page: Page;    constructor(page: Page) {     this.page = page;   }    @Given('I am on the Todo page')   async navigateToTodoPage() {     await this.page.goto('https:\/\/demo.playwright.dev\/todomvc\/#\/');   }    @When('I create a new todo item with text {string}')   async createTodoItem(text: string) {     await this.page.getByPlaceholder('What needs to be done?').fill(text);     await this.page.getByPlaceholder('What needs to be done?').press('Enter');   }    @When('I complete the todo item with text {string}')   async completeTodoItem(text: string) {     await this.page.getByTestId('todo-item').filter({ hasText: text }).getByLabel('Toggle Todo').check();   }    @When('I filter to see only completed items')   async filterCompletedItems() {     await this.page.getByRole('link', { name: 'Completed' }).click();   }    @Then('I should see the following todo items:')   async verifyTodoItemsVisible(itemList: DataTable) {     await expect(this.page.getByTestId('todo-title')).toHaveText(itemList.raw().flat());   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>3. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432. \u0412\u0430\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c ChatGPT \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a.<\/p>\n<blockquote>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0438 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0448\u0430\u0433\u0438. \u041d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435<\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432 \u0432 <code>playwright-bdd<\/code> \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>bddgen export<\/code>. \u041e\u043d\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432 \u0438\u0437 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u0448\u0430\u0433\u043e\u0432 \u0438\u0437 <code>TodoPage<\/code>:<\/p>\n<pre><code>> npx bddgen export  List of all steps found by config: playwright.config.ts  * Given I am on the Todo page * When I create a new todo item with text {string} * When I complete the todo item with text {string} * When I filter to see only completed items * Then I should see the following todo items:<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0448\u0430\u0433\u043e\u0432 \u044f \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a ChatGPT.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441<\/strong> \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432:<\/p>\n<pre><code>Generate BDD scenarios as a single Gherkin file strictly using only the following steps:  * Given I am on the Todo page * When I create a new todo item with text {string} * When I complete the todo item with text {string} * When I filter to see only completed items * Then I should see the following todo items:<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 ChatGPT<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>Feature: Todo List Management    Scenario: Create a new todo item     Given I am on the Todo page     When I create a new todo item with text \"Buy groceries\"     Then I should see the following todo items:       | Todo Text       |       | Buy groceries   |    Scenario: Complete a todo item     Given I am on the Todo page     When I create a new todo item with text \"Read a book\"     And I complete the todo item with text \"Read a book\"     Then I should see the following todo items:       | Todo Text     |       | [x] Read a book |    Scenario: Filter completed items     Given I am on the Todo page     When I create a new todo item with text \"Walk the dog\"     And I create a new todo item with text \"Water the plants\"     And I complete the todo item with text \"Walk the dog\"     And I filter to see only completed items     Then I should see the following todo items:       | Todo Text         |       | [x] Walk the dog |    Scenario: Filter completed items with multiple completed items     Given I am on the Todo page     When I create a new todo item with text \"Go for a run\"     And I create a new todo item with text \"Write code\"     And I complete the todo item with text \"Go for a run\"     And I complete the todo item with text \"Write code\"     And I filter to see only completed items     Then I should see the following todo items:       | Todo Text        |       | [x] Go for a run |       | [x] Write code   |<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043d\u043e\u0432\u0430 \u043d\u0435\u043f\u043b\u043e\u0445. ChatGPT \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <em>Given-When-Then<\/em> \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437, \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>Background<\/code> \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 <code>beforeEach()<\/code> <\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c <code>[x]<\/code> \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u2014 \u0438\u043d\u0430\u0447\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <code>Todo Text<\/code> \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u2014 \u043e\u043d \u0442\u0443\u0442\u00a0\u043b\u0438\u0448\u043d\u0438\u0439, \u0442. \u043a. \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0430<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0423\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<pre><code>* Use \"Background\" for common steps. * Don't use \"[x]\" * Don't use \"Todo Text\" header<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 ChatGPT<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>Feature: Todo List Management    Background:     Given I am on the Todo page    Scenario: Create a new todo item     When I create a new todo item with text \"Buy groceries\"     Then I should see the following todo items:       | Buy groceries   |    Scenario: Complete a todo item     When I create a new todo item with text \"Read a book\"     And I complete the todo item with text \"Read a book\"     Then I should see the following todo items:       | Read a book   |    Scenario: Filter completed items     When I create a new todo item with text \"Walk the dog\"     And I create a new todo item with text \"Water the plants\"     And I complete the todo item with text \"Walk the dog\"     And I filter to see only completed items     Then I should see the following todo items:       | Walk the dog   |    Scenario: Filter completed items with multiple completed items     When I create a new todo item with text \"Go for a run\"     And I create a new todo item with text \"Write code\"     And I complete the todo item with text \"Go for a run\"     And I complete the todo item with text \"Write code\"     And I filter to see only completed items     Then I should see the following todo items:       | Go for a run   |       | Write code     |<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b. \u041d\u0430\u0441\u0442\u0430\u043b \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435!<\/p>\n<h2>4. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a BDD \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Playwright \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u0445\u043e\u0442\u044f \u044d\u0442\u043e <a href=\"https:\/\/github.com\/microsoft\/playwright\/issues\/11975\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/a>. \u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e <code>playwright-bdd<\/code>. \u0412\u0441\u0435 \u0448\u0430\u0433\u0438 \u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0414\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u044f \u043e\u043f\u0443\u0449\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/vitalets\/playwright-bdd-example\/tree\/ai\" rel=\"noopener noreferrer nofollow\">\u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub<\/a> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0434\u043b\u044f TodoList \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0448\u0430\u0433\u0430\u0445 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f Playwright \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<details class=\"spoiler\">\n<summary>playwright.config.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { defineConfig } from '@playwright\/test'; import { defineBddConfig } from 'playwright-bdd';  const testDir = defineBddConfig({   paths: ['.\/features\/todopage.feature'], \/\/ &lt;- BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438   importTestFrom: 'steps\/fixtures.ts',    \/\/ &lt;- \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432 });  export default defineConfig({   testDir,   reporter: 'html', });<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0424\u0430\u0439\u043b <code>fixtures.ts<\/code> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 <code>TodoPage<\/code> \u0432 \u0432\u0438\u0434\u0435 <a href=\"https:\/\/playwright.dev\/docs\/test-fixtures\" rel=\"noopener noreferrer nofollow\">\u0444\u0438\u043a\u0441\u0442\u0443\u0440\u044b<\/a>:<\/p>\n<details class=\"spoiler\">\n<summary>steps\/fixtures.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { test as base } from 'playwright-bdd'; import { TodoPage } from '.\/TodoPage';  export const test = base.extend&lt;{ todoPage: TodoPage }>({   todoPage: async ({ page }, use) => use(new TodoPage(page)), });<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u044b:<\/p>\n<pre><code>npx bddgen &amp;&amp; npx playwright test<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code>Running 4 tests using 1 worker   4 passed (2.7s)  To open last HTML report run:    npx playwright show-report<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0448\u043b\u0438! \u0423\u0440\u0430 ?<\/p>\n<p>HTML \u043e\u0442\u0447\u0451\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/790\/c64\/b4c\/790c64b4cc7cdfac839c78cf28ddf11d.png\" alt=\"HTML report\" title=\"HTML \u043e\u0442\u0447\u0451\u0442\" width=\"1502\" height=\"782\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/790\/c64\/b4c\/790c64b4cc7cdfac839c78cf28ddf11d.png\"\/><\/p>\n<div><figcaption>HTML \u043e\u0442\u0447\u0451\u0442<\/figcaption><\/div>\n<\/figure>\n<h2>5. \u041f\u043e\u0434\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u043e\u0433<\/h2>\n<p>\u042f \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c. \u0414\u0430, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b ChatGPT, \u043d\u043e \u043d\u0430 \u044d\u0442\u043e \u0443\u0448\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u2014 \u043d\u0435 \u0442\u043e\u0442 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u0438\u043d\u043e\u0433\u0434\u0430 <s>\u0437\u0430\u0431\u0438\u0432\u0430\u044e\u0442<\/s> \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442. \u042d\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0430\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0442\u0432\u043e\u0439 \u043f\u0430\u0440\u0442\u043d\u0451\u0440 \u2014 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c. \u041e\u043d\u0430 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u0448\u0438\u0431\u0430\u0442\u044c\u0441\u044f, \u0437\u0430\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f, \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043d\u0430\u0447\u0438\u0442\u0430\u043d\u043d\u0430\u044f \u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u0441 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0437\u043c\u043e\u043c \u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043b\u044e\u0431\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438!<\/p>\n<p><strong>BDD-\u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f AI-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/strong> \u041e\u043d \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438 \u043b\u0435\u0433\u043a\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439. \u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0448\u0430\u0433\u0438 \u0432 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438, \u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Playwright \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u0437\u0435\u043b\u0451\u043d\u044b\u0445 \u0432\u0430\u043c \u0442\u0435\u0441\u0442\u043e\u0432 \u2764\ufe0f<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/758980\/\"> https:\/\/habr.com\/ru\/articles\/758980\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u00a0\u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e \u043f\u043e\u0434\u0445\u043e\u0434 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Behavior-driven_development\" rel=\"noopener noreferrer nofollow\">Behavior Driven Development (BDD)<\/a> \u0434\u043b\u044f\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f end\u2011to\u2011end \u0442\u0435\u0441\u0442\u043e\u0432. \u0425\u043e\u0442\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u044f \u0441\u043a\u0435\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u043b\u0441\u044f \u043a <em>Given\u2011When\u2011Then<\/em> \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0443, \u0442\u0435\u043f\u0435\u0440\u044c \u0447\u0430\u0441\u0442\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u00a0\u2014 \u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u00a0\u043f\u0438\u0448\u0443 BDD\u2011\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e \u0438\u0445 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/chat.openai.com\/\" rel=\"noopener noreferrer nofollow\">ChatGPT<\/a>.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c AI-\u0442\u0435\u0441\u0442\u044b \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/playwright.dev\/\" rel=\"noopener noreferrer nofollow\">Playwright<\/a>.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>AI \u043f\u0438\u0448\u0435\u0442 \u0442\u0435\u0441\u0442\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f\u00a0\u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043c\u043e\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/demo.playwright.dev\/todomvc\/\" rel=\"noopener noreferrer nofollow\">TodoList<\/a>, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 Playwright. \u042d\u0442\u043e \u0432\u0435\u0431\u2011\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u00a0\u0441\u0442\u0430\u0442\u0443\u0441\u0443. \u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0446\u0435\u043b\u044c\u00a0\u2014 \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 end\u2011to\u2011end \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043a\u043e\u0434\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0440\u0430\u0431\u043e\u0442\u044b ChatGPT. \u0412\u00a0\u0438\u0434\u0435\u0430\u043b\u0435 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0435\u0437\u00a0\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a. \u041d\u0438\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<figure class=\"\">\n<div><figcaption>TodoList<\/figcaption><\/div>\n<\/figure>\n<h2>\u041f\u043b\u0430\u043d<\/h2>\n<p>\u0410 \u043c\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f (user story)<\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u043e\u0433<\/p>\n<\/li>\n<\/ol>\n<h2>1. \u0421\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f (user story)<\/h2>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f (user story) \u2014 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 BDD. \u042d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0446\u0435\u043b\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f TodoList \u0432\u043e\u0437\u044c\u043c\u0451\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code>As a user I want to manage items in todo list:  create items, complete items and filter to see only completed items.<\/code><\/pre>\n<p><em>\u0412\u0441\u0435 \u0442\u0435\u043a\u0441\u0442\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0432 ChatGPT, \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c <\/em>\u2014<em> \u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430.<\/em><\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a ChatGPT.<\/p>\n<h2>2. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0448\u0430\u0433\u043e\u0432<\/h2>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0448\u0430\u0433\u0430 (step definition) \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code>Given I open TodoApp page<\/code><\/pre>\n<p>\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430:<\/p>\n<pre><code class=\"typescript\">await page.goto('https:\/\/demo.playwright.dev\/todomvc\/');<\/code><\/pre>\n<p>\u0418\u043b\u0438<\/p>\n<pre><code>When I click the button<\/code><\/pre>\n<p>\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f:<\/p>\n<pre><code class=\"typescript\">await page.getByTestId('button').click();<\/code><\/pre>\n<p>\u041d\u0430\u0431\u043e\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u0448\u0430\u0433\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 <a href=\"https:\/\/playwright.dev\/docs\/pom\" rel=\"noopener noreferrer nofollow\">Page Object Model<\/a> \u2014 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 <code>TodoPage<\/code> \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0448\u0430\u0433\u043e\u0432 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b HTML, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443. \u041d\u043e&#8230; ChatGPT \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 TypeScript \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432 <a href=\"https:\/\/github.com\/microsoft\/playwright\" rel=\"noopener noreferrer nofollow\">@playwright\/test<\/a> \u0438 <a href=\"https:\/\/github.com\/vitalets\/playwright-bdd\" rel=\"noopener noreferrer nofollow\">playwright-bdd<\/a> \u2014 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 Playwright.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441<\/strong> \u043a ChatGPT \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>TodoPage<\/code> :<\/p>\n<pre><code>Create Page Object Model 'TodoPage' in Typescript for the following feature:  As a user I want to manage items in todo list:  create items, complete items and filter to see only completed items.  * Use page from '@playwright\/test' as constructor parameter. * Use Given, When, Then from 'playwright-bdd\/decorators' as BDD decorators, for example: @Given('pattern {string}'). * Don't fill methods body.<\/code><\/pre>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0447\u0430\u0442 \u0438 \u0436\u0434\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041c\u0435\u043d\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0433\u0438\u043f\u043d\u043e\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0432\u0442\u043e-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 ?<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f Page Object Model \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 ChatGPT<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { Page } from '@playwright\/test'; import { Given, When, Then } from 'playwright-bdd\/decorators';  export class TodoPage {   private page: Page;    constructor(page: Page) {     this.page = page;   }    @Given('I am on the Todo page')   async navigateToTodoPage() {     \/\/ Implement navigation to the Todo page here   }    @When('I create a new todo item with text {string}')   async createTodoItem(text: string) {     \/\/ Implement creating a new todo item here   }    @When('I complete the todo item with text {string}')   async completeTodoItem(text: string) {     \/\/ Implement completing a todo item here   }    @When('I filter to see only completed items')   async filterCompletedItems() {     \/\/ Implement filtering completed items here   }    @Then('I should see the todo item with text {string}')   async verifyTodoItemVisible(text: string) {     \/\/ Implement verification logic here   }    @Then('I should not see the todo item with text {string}')   async verifyTodoItemNotVisible(text: string) {     \/\/ Implement verification logic here   }    @Then('I should see only completed todo items')   async verifyOnlyCompletedItemsVisible() {     \/\/ Implement verification logic here   }    @Then('I should see all todo items')   async verifyAllItemsVisible() {     \/\/ Implement verification logic here   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u043e: ChatGPT \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u043e\u043c\u0435\u0442\u0438\u043b \u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u043a\u0438\u043d\u0443\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044f \u0445\u043e\u0447\u0443 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0412\u043c\u0435\u0441\u0442\u043e 4-\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0446\u0435\u043b\u0438\u043a\u043e\u043c. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439. \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0447\u0430\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p><strong>\u0423\u0442\u043e\u0447\u043d\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/strong><\/p>\n<pre><code>Replace all verify methods with single method that verifies list of visible items<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u0442\u0432\u0435\u0442 ChatGPT (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u0435\u0442\u043e\u0434)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { Page } from '@playwright\/test'; import { Given, When, Then } from 'playwright-bdd\/decorators';  export class TodoPage {   private page: Page;    constructor(page: Page) {     this.page = page;   }    @Given('I am on the Todo page')   async navigateToTodoPage() {     \/\/ Implement navigation to the Todo page here   }    @When('I create a new todo item with text {string}')   async createTodoItem(text: string) {     \/\/ Implement creating a new todo item here   }    @When('I complete the todo item with text {string}')   async completeTodoItem(text: string) {     \/\/ Implement completing a todo item here   }    @When('I filter to see only completed items')   async filterCompletedItems() {     \/\/ Implement filtering completed items here   }    @Then('I should see the following todo items:')   async verifyTodoItemsVisible(itemList: string[]) {     for (const itemText of itemList) {       \/\/ Implement verification logic for each itemText here     }   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e. ChatGPT \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0435\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u043c\u0438.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 ChatGPT, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043b\u0443\u0447\u0448\u0435 \u043b\u0438 \u0445\u0443\u0436\u0435. \u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0451\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0438\u0441\u0442\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u044f\u0445. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442:<\/p>\n<ul>\n<li>\n<p><code>make all methods async<\/code> \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 ChatGPT \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<\/p>\n<\/li>\n<li>\n<p><code>use {string} for string pattern parameters<\/code> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441 <a href=\"https:\/\/github.com\/cucumber\/cucumber-expressions\" rel=\"noopener noreferrer nofollow\">Cucumber Expression<\/a> \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p><code>create todo items inside scenario \"xxx\"<\/code> \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b<\/p>\n<\/li>\n<li>\n<p><code>don't start method names with given\/when\/then<\/code> \u2014 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0445 \u0438\u043c\u0451\u043d \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. ChatGPT, \u043a\u0430\u043a \u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u0441\u0442\u0430\u043b\u043e:<\/p>\n<ol>\n<li>\n<p>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 <code>TodoPage<\/code> \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e, \u0442.\u043a. \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<h3>2.1 \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0438\u0437\u0443\u0447\u0430\u044f HTML-\u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041d\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u2014 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043a\u043e\u0434\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, Playwright \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/playwright.dev\/docs\/codegen\" rel=\"noopener noreferrer nofollow\">codegen<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439  \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>\u0420\u0435\u0436\u0438\u043c codegen \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b:<\/p>\n<pre><code>npx playwright codegen https:\/\/demo.playwright.dev\/todomvc<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c URL \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ol>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\">\n<div><figcaption>\u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b \u043f\u043e\u0434 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u043e\u043c codegen<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"typescript\">test('test', async ({ page }) => {   await page.goto('https:\/\/demo.playwright.dev\/todomvc\/#\/');   await page.getByPlaceholder('What needs to be done?').fill('feed the dog');   await page.getByPlaceholder('What needs to be done?').press('Enter');   await page.getByPlaceholder('What needs to be done?').fill('feed the cat');   await page.getByPlaceholder('What needs to be done?').press('Enter');   await page.locator('li').filter({ hasText: 'feed the cat' }).getByLabel('Toggle Todo').check();   await page.getByRole('link', { name: 'Completed' }).click(); });<\/code><\/pre>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0442 ChatGPT.<\/p>\n<p>\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0440\u0443\u0447\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a \u043d\u0435 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 DOM \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440 <code>page.locator('li')<\/code> \u044f \u0437\u0430\u043c\u0435\u043d\u044e \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 <code>page.getByTestId('todo-title')<\/code>.<\/p>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>TodoPage<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>TodoPage.ts<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">import { Page, expect } from '@playwright\/test'; import { Given, When, Then, Fixture } from 'playwright-bdd\/decorators'; import { DataTable } from '@cucumber\/cucumber';  export @Fixture('todoPage') class TodoPage {   private page: Page;    constructor(page: Page) {     this.page = page;   }    @Given('I am on the Todo page')   async navigateToTodoPage() {     await this.page.goto('https:\/\/demo.playwright.dev\/todomvc\/#\/');   }    @When('I create a new todo item with text {string}')   async createTodoItem(text: string) {     await this.page.getByPlaceholder('What needs to be done?').fill(text);     await this.page.getByPlaceholder('What needs to be done?').press('Enter');   }    @When('I complete the todo item with text {string}')   async completeTodoItem(text: string) {     await this.page.getByTestId('todo-item').filter({ hasText: text }).getByLabel('Toggle Todo').check();   }    @When('I filter to see only completed items')   async filterCompletedItems() {     await this.page.getByRole('link', { name: 'Completed' }).click();   }    @Then('I should see the following todo items:')   async verifyTodoItemsVisible(itemList: DataTable) {     await expect(this.page.getByTestId('todo-title')).toHaveText(itemList.raw().flat());   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>3. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 BDD \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432. \u0412\u0430\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c ChatGPT \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a.<\/p>\n<blockquote>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0438 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b: <\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-354017","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354017"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354017\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}