From 615073aa56d4a1c721ba985a5c927de4cc01be97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Moitti=C3=A9?= Date: Wed, 21 Aug 2024 14:15:58 +0200 Subject: [PATCH] e2e --- cypress/e2e/Bugfix/Issue407.feature | 2 +- cypress/e2e/DiagramsPage/CreateDiagram.feature | 2 +- cypress/e2e/DiagramsPage/DeleteDiagrams.feature | 2 +- cypress/e2e/DiagramsPage/DisplayDiagrams.feature | 4 ++-- cypress/e2e/DiagramsPage/FocusMovementDiagrams.feature | 2 +- cypress/e2e/DiagramsPage/ZoomDiagrams.feature | 2 +- .../ModelizerPage/DrawView/plugin/DisplayComponent.feature | 2 +- cypress/e2e/ModelizerPage/SwitchView/AddComponent.feature | 2 +- cypress/e2e/ModelizerPage/SwitchView/Delete.feature | 2 +- cypress/e2e/RoundTrips/DrawEditor.feature | 2 +- cypress/e2e/RoundTrips/SimpleProject.feature | 6 +++--- cypress/e2e/RoundTrips/TemplateProject.feature | 2 +- cypress/e2e/RoundTrips/TextEditor.feature | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cypress/e2e/Bugfix/Issue407.feature b/cypress/e2e/Bugfix/Issue407.feature index 9137d1b7e..9cf1c67f0 100644 --- a/cypress/e2e/Bugfix/Issue407.feature +++ b/cypress/e2e/Bugfix/Issue407.feature @@ -19,7 +19,7 @@ Feature: Fix issue #407: Click on component definition from palette causes error And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/githubator-plugin&path=\.github/workflows/Githubator.yml' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/githubator-plugin"] [data-cy="title"]' is '@ditrit/githubator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/githubator-plugin"] [data-cy="title"]' is 'GitHub Action' # Click on component When I click on '[data-cy="component-definitions-item_@ditrit/githubator-plugin"]' diff --git a/cypress/e2e/DiagramsPage/CreateDiagram.feature b/cypress/e2e/DiagramsPage/CreateDiagram.feature index 008bcffd7..30fae9b28 100644 --- a/cypress/e2e/DiagramsPage/CreateDiagram.feature +++ b/cypress/e2e/DiagramsPage/CreateDiagram.feature @@ -28,7 +28,7 @@ Feature: Test diagrams page: diagram creation And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ modelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' # Go to text view and check files When I click on '[data-cy="modelizer-switch-button"] [aria-pressed="false"]' diff --git a/cypress/e2e/DiagramsPage/DeleteDiagrams.feature b/cypress/e2e/DiagramsPage/DeleteDiagrams.feature index bc6430fbc..4392937a3 100644 --- a/cypress/e2e/DiagramsPage/DeleteDiagrams.feature +++ b/cypress/e2e/DiagramsPage/DeleteDiagrams.feature @@ -26,7 +26,7 @@ Feature: Test diagrams page: delete diagram And I wait 2 seconds Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ modelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' And I click on '[data-cy="component-definition_aws"]' diff --git a/cypress/e2e/DiagramsPage/DisplayDiagrams.feature b/cypress/e2e/DiagramsPage/DisplayDiagrams.feature index 3ddf50bb1..af43b6b91 100644 --- a/cypress/e2e/DiagramsPage/DisplayDiagrams.feature +++ b/cypress/e2e/DiagramsPage/DisplayDiagrams.feature @@ -26,7 +26,7 @@ Feature: Test diagrams page: display all diagrams And I wait 2 seconds Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ firstModelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' And I click on '[data-cy="component-definition_aws"]' @@ -47,7 +47,7 @@ Feature: Test diagrams page: display all diagrams And I wait 2 seconds Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ secondModelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' And I click on '[data-cy="component-definition_aws"]' diff --git a/cypress/e2e/DiagramsPage/FocusMovementDiagrams.feature b/cypress/e2e/DiagramsPage/FocusMovementDiagrams.feature index 8b0fe6ea8..b17523eb9 100644 --- a/cypress/e2e/DiagramsPage/FocusMovementDiagrams.feature +++ b/cypress/e2e/DiagramsPage/FocusMovementDiagrams.feature @@ -25,7 +25,7 @@ Feature: Test diagrams page: move all diagrams And I wait 2 seconds Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ modelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' And I click on '[data-cy="component-definition_aws"]' diff --git a/cypress/e2e/DiagramsPage/ZoomDiagrams.feature b/cypress/e2e/DiagramsPage/ZoomDiagrams.feature index e3142a53f..f1824be0f 100644 --- a/cypress/e2e/DiagramsPage/ZoomDiagrams.feature +++ b/cypress/e2e/DiagramsPage/ZoomDiagrams.feature @@ -26,7 +26,7 @@ Feature: Test diagrams page: zoom on all diagrams And I wait 2 seconds Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ modelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' And I click on '[data-cy="component-definition_aws"]' diff --git a/cypress/e2e/ModelizerPage/DrawView/plugin/DisplayComponent.feature b/cypress/e2e/ModelizerPage/DrawView/plugin/DisplayComponent.feature index 5426af150..8a7bd19c0 100644 --- a/cypress/e2e/ModelizerPage/DrawView/plugin/DisplayComponent.feature +++ b/cypress/e2e/ModelizerPage/DrawView/plugin/DisplayComponent.feature @@ -22,7 +22,7 @@ Feature: Test modelizer draw view: add plugin component And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is 'projectName/modelizer/draw\?plugin=@ditrit/terrator-plugin&path=infra' And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' appear 1 time on screen - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' # Select '@ditrit/terrator-plugin' library When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' diff --git a/cypress/e2e/ModelizerPage/SwitchView/AddComponent.feature b/cypress/e2e/ModelizerPage/SwitchView/AddComponent.feature index 3a928c926..4344e58f4 100644 --- a/cypress/e2e/ModelizerPage/SwitchView/AddComponent.feature +++ b/cypress/e2e/ModelizerPage/SwitchView/AddComponent.feature @@ -21,7 +21,7 @@ Feature: Test switch model to text view: add component/link And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is 'projectName/modelizer/draw\?plugin=@ditrit/terrator-plugin&path=infra' And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' appear 1 time on screen - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' # Select '@ditrit/terrator-plugin' library When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' diff --git a/cypress/e2e/ModelizerPage/SwitchView/Delete.feature b/cypress/e2e/ModelizerPage/SwitchView/Delete.feature index f892b690b..52558cced 100644 --- a/cypress/e2e/ModelizerPage/SwitchView/Delete.feature +++ b/cypress/e2e/ModelizerPage/SwitchView/Delete.feature @@ -21,7 +21,7 @@ Feature: Test switch model to text view: delete component/link And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is 'projectName/modelizer/draw\?plugin=@ditrit/terrator-plugin&path=infra' And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' appear 1 time on screen - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' # Select '@ditrit/terrator-plugin' library When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' diff --git a/cypress/e2e/RoundTrips/DrawEditor.feature b/cypress/e2e/RoundTrips/DrawEditor.feature index 3023394d4..e5b4b34dc 100644 --- a/cypress/e2e/RoundTrips/DrawEditor.feature +++ b/cypress/e2e/RoundTrips/DrawEditor.feature @@ -68,7 +68,7 @@ Feature: Test roundtrip of the application: draw editor ## 101 Terrator plugin should appear in component definitions list And I expect '[data-cy="component-definitions-list"]' exists And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' ## 102 Should have only one plugin installed with all these definitions When I click on '[data-cy="component-definitions-item_@ditrit/terrator-plugin"]' diff --git a/cypress/e2e/RoundTrips/SimpleProject.feature b/cypress/e2e/RoundTrips/SimpleProject.feature index cb93bb35f..efe410852 100644 --- a/cypress/e2e/RoundTrips/SimpleProject.feature +++ b/cypress/e2e/RoundTrips/SimpleProject.feature @@ -260,7 +260,7 @@ Feature: Test roundtrip of the application: project creation And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ firstModelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' # Back to the models page When I click on '[data-cy="models-page-link-button"]' @@ -276,7 +276,7 @@ Feature: Test roundtrip of the application: project creation And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ secondModelFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' And I expect '[data-cy="file_{{ projectName }}/model2/new_file.tf"]' not exists And I expect '[data-cy="file_{{ projectName }}/leto-modelizer.config.json"]' not exists @@ -345,7 +345,7 @@ Feature: Test roundtrip of the application: project creation When I click on '[data-cy="diagram-path_{{ modelRenamed }}"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ modelRenamed }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' When I click on '[data-cy="modelizer-switch-button"] [aria-pressed="false"]' And I wait 2 seconds diff --git a/cypress/e2e/RoundTrips/TemplateProject.feature b/cypress/e2e/RoundTrips/TemplateProject.feature index b4d05aa49..245954195 100644 --- a/cypress/e2e/RoundTrips/TemplateProject.feature +++ b/cypress/e2e/RoundTrips/TemplateProject.feature @@ -152,7 +152,7 @@ Feature: Test roundtrip of the application: project creation via template And I click on '[data-cy="import-model-template-form"] [data-cy="submit-button"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ diagramFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' ## 401 Add diagram template should create diagram folders When I click on '[data-cy="modelizer-switch-button"] [aria-pressed="false"]' diff --git a/cypress/e2e/RoundTrips/TextEditor.feature b/cypress/e2e/RoundTrips/TextEditor.feature index 3a710d87f..7b5bf7763 100644 --- a/cypress/e2e/RoundTrips/TextEditor.feature +++ b/cypress/e2e/RoundTrips/TextEditor.feature @@ -60,7 +60,7 @@ Feature: Test roundtrip of the application: text editor And I click on '[data-cy="create-model-form"] [data-cy="submit-button"]' Then I expect current url is '{{ projectName }}/modelizer/draw\?plugin=@ditrit/terrator-plugin&path={{ diagramFolder }}' And I expect '[data-cy="component-definitions-list"]' exists - And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is '@ditrit/terrator-plugin' + And I expect '[data-cy="component-definitions-item_@ditrit/terrator-plugin"] [data-cy="title"]' is 'Terraform' # Go to text view When I click on '[data-cy="modelizer-switch-button"] [aria-pressed="false"]'