From 91f24670d8c7045a793b86b178f5e959549e950a Mon Sep 17 00:00:00 2001 From: Mihail Gregurco Date: Wed, 10 Apr 2024 09:46:08 +0300 Subject: [PATCH] #618 change test yaml file --- CHANGELOG.md | 4 ++ README.md | 6 +-- VERSION | 2 +- custom-vs-baseline.sh | 3 ++ ...y-project-projectID-demo-test-project.yaml | 49 +++++++++++++++++++ examples/diffy_update_project.yaml | 20 -------- src/Commands/ProjectCommand.php | 8 +-- 7 files changed, 64 insertions(+), 28 deletions(-) mode change 100644 => 100755 custom-vs-baseline.sh create mode 100644 examples/diffy-project-projectID-demo-test-project.yaml delete mode 100644 examples/diffy_update_project.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index c127155..2c65608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 1.37 + +* Update project from YAML file + ### 0.1.28 * Added the diffy screenshot:create-baseline command * Added the diffy screenshot:set-baseline command diff --git a/README.md b/README.md index d8c40ea..9ea801f 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ Great for building integrations for your CI/CD tools. Allows scription taking sc Download latest release from [https://github.com/DiffyWebsite/diffy-cli/releases](https://github.com/DiffyWebsite/diffy-cli/releases) page. Download just `diffy.phar` file. No need for all the source code. You can copy file to your executables so it is available everywhere. ```shell script -chmod a+x diffy.phar -cp diffy.phar /usr/local/bin/diffy +wget -O /usr/local/bin/diffy https://github.com/diffywebsite/diffy-cli/releases/latest/download/diffy.phar +chmod a+x /usr/local/bin/diffy ``` ### Installion with Composer @@ -97,7 +97,7 @@ If you want to update your config (For example, from CICD) ```shell script diffy project:update PROJECT_ID ./examples/diffy_update_project.json ``` -See the ./examples/diffy_update_project.json or ./examples/diffy_update_project.yaml file for a valid config file. +See the ./examples/diffy_update_project.json or ./examples/diffy-project-projectID-demo-test-project.yaml file for a valid config file. For multiple projects ```shell script diff --git a/VERSION b/VERSION index 50140e3..9f42295 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.33 +0.1.37 diff --git a/custom-vs-baseline.sh b/custom-vs-baseline.sh old mode 100644 new mode 100755 index e69de29..22fb2b3 --- a/custom-vs-baseline.sh +++ b/custom-vs-baseline.sh @@ -0,0 +1,3 @@ +CUSTOM_URL="https://diffy.website" +CUSTOM_SCREENSHOT_ID=$(diffy screenshot:create 22119 custom --envUrl=${MULTIDEV_SITE_URL}) +diffy diff:create 22119 ${CUSTOM_SCREENSHOT_ID} 520974 diff --git a/examples/diffy-project-projectID-demo-test-project.yaml b/examples/diffy-project-projectID-demo-test-project.yaml new file mode 100644 index 0000000..3a46e46 --- /dev/null +++ b/examples/diffy-project-projectID-demo-test-project.yaml @@ -0,0 +1,49 @@ +basic: + name: 'Desk' + environments: + production: 'https://wordpress.diffy.website' + staging: 'http://stage.wordpress.diffy.website' + development: '' + breakpoints: + - 640 + - 1024 + - 1200 + pages: + - / + - /2019/01 + - /sample-page + - /2019/03/12/hello-world + - /category/uncategorized + - /2019/03/01/delectus-quia-esse-aut + monitoring: + days: { } + type: '' +advanced: + mask: '' + remove: '' + isolate: '' + delay: 10 + scroll: false + headers: + - { header: user-agent, value: Googlebot-Image/1.0 } + cookies: '' + custom_js: '' + custom_css: '' + mock_content: '' + login: + type: '' + click_element: false + click_element_selector: '' + login_url: '' + username: '' + password: '' + username_selector: '' + password_selector: '' + submit_selector: '' + after_login_selector: '' + performance: + workers_production: 30 + workers_nonproduction: 10 + workers_production_delay: 0 + workers_nonproduction_delay: 0 + stabilize: false diff --git a/examples/diffy_update_project.yaml b/examples/diffy_update_project.yaml deleted file mode 100644 index fa693f3..0000000 --- a/examples/diffy_update_project.yaml +++ /dev/null @@ -1,20 +0,0 @@ -basic: - name: 'Demo test project' - environments: { production: 'https://wordpress.diffy.website', staging: 'http://stage.wordpress.diffy.website', development: '' } - breakpoints: [640, 1024, 1200] - pages: ['https://wordpress.diffy.website', 'https://wordpress.diffy.website/2019/01', 'https://wordpress.diffy.website/sample-page', 'https://wordpress.diffy.website/2019/03/12/hello-world', 'https://wordpress.diffy.website/category/uncategorized', 'https://wordpress.diffy.website/2019/03/01/delectus-quia-esse-aut', 'https://wordpress.diffy.website/2019/04/01/tempora-ut-similique-corporis-sit', 'https://wordpress.diffy.website/2019/02/08/sed-natus-molestiae-ullam-sint-quia', 'https://wordpress.diffy.website/2019/02/02/quo-suscipit-aut-et-est-adipisci-qui', 'https://wordpress.diffy.website/2019/02/12/qui-officia-et-veniam-sit-quibusdam-non', 'https://wordpress.diffy.website/2019/03/16/sunt-praesentium-animi-sed-omnis-ut-iste', 'https://wordpress.diffy.website/2019/04/01/tempora-ut-similique-corporis-sit/#respond', 'https://wordpress.diffy.website/2019/02/08/sed-natus-molestiae-ullam-sint-quia/#respond', 'https://wordpress.diffy.website/2019/02/01/quaerat-earum-aut-reiciendis-vitae-aut-dolore', 'https://wordpress.diffy.website/2019/02/02/quo-suscipit-aut-et-est-adipisci-qui/#respond', 'https://wordpress.diffy.website/2019/02/12/qui-officia-et-veniam-sit-quibusdam-non/#respond', 'https://wordpress.diffy.website/2019/03/16/sunt-praesentium-animi-sed-omnis-ut-iste/#respond', 'https://wordpress.diffy.website/2019/03/21/voluptatibus-tenetur-iste-commodi-officiis-repellat', 'https://wordpress.diffy.website/2019/04/03/ratione-laboriosam-velit-quibusdam-animi-maiores-labore-vel', 'https://wordpress.diffy.website/2019/03/21/voluptatibus-tenetur-iste-commodi-officiis-repellat/#respond', 'https://wordpress.diffy.website/2019/04/03/ratione-laboriosam-velit-quibusdam-animi-maiores-labore-vel/#respond'] - monitoring: { days: { }, type: '' } -advanced: - mask: '' - remove: '' - isolate: '' - delay: 10 - scroll: false - headers: [{ value: Googlebot-Image/1.0, header: user-agent }] - cookies: '' - custom_js: '' - custom_css: '' - mock_content: '' - login: { type: '', click_element: false, click_element_selector: '', login_url: '', username: '', password: '', username_selector: '', password_selector: '', submit_selector: '', after_login_selector: '' } - performance: { workers_production: 30, workers_nonproduction: 10, workers_production_delay: 0, workers_nonproduction_delay: 0 } - stabilize: false diff --git a/src/Commands/ProjectCommand.php b/src/Commands/ProjectCommand.php index ef4a5a2..a487fd0 100644 --- a/src/Commands/ProjectCommand.php +++ b/src/Commands/ProjectCommand.php @@ -175,15 +175,15 @@ public function createCompare( } /** - * Update single project configuration + * Update single project configuration from YAML file * * @command project:update * * @param int $projectId Id of the project. - * @param string $configurationPath Path to the json config file. + * @param string $configurationPath Path to the YAML config file. * - * @usage project:update 342 ./examples/diffy_update_project.json - * Updates given project ID with the diffy config. + * @usage project:update 342 ./examples/diffy_update_project.yaml + * Configuration can be downloaded from Project's settings page. * * @throws InvalidArgumentException */