Skip to content

Commit

Permalink
MWB-904: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverBerserk committed Dec 16, 2024
1 parent 52a93b7 commit 5b6386c
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 11 deletions.
9 changes: 6 additions & 3 deletions mapping_workbench/frontend/cypress/e2e/activities.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Feature: Activities
Background:
Given Session Login
Then Go Home
Then I open side menu

Scenario: Import Packages
When I open side menu
Then I go to Mapping Packages
Then I get redirected to Mapping Packages list page
When I click on Mapping Packages import
Expand All @@ -16,27 +16,30 @@ Feature: Activities
Then I get success upload

Scenario: View Activities
When I open side menu
Then I go to Activities page
Then I get redirected to Tasks page
Then I receive Tasks


Scenario: Refresh Activities
When I open side menu
Then I go to Activities page
Then I get redirected to Tasks page
Then I receive Tasks
Then I click on refresh button
Then I receive Tasks

Scenario: Delete Activity
When I open side menu
Then I go to Activities page
Then I get redirected to Tasks page
Then I receive Tasks
When I open actions menu
When I delete Task
Then I get success delete


Scenario: Delete all Activities
When I open side menu
Then I go to Activities page
Then I get redirected to Tasks page
Then I receive Tasks
Expand Down
1 change: 1 addition & 0 deletions mapping_workbench/frontend/cypress/e2e/cleanUp.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Feature: CleanUp after test
Then I get redirected to projects list page
Then I type project name

When I open actions menu
When I click on delete button
Then I click yes button
Then I get success delete
3 changes: 3 additions & 0 deletions mapping_workbench/frontend/cypress/e2e/common/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ When('I select project', () => {
cy.get('#project_switch').click().get('ul > li > p').contains('TEST_PROJECT').click()
})

When('I open actions menu',() => {
cy.get('#actions-menu-button').click()
})

Then('I expand tasks', () => {
cy.get('#nav_tasks').click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: Mapping Packages
Then I click on upload button
Then I get success upload

Scenario: View Pacakges
Scenario: View Packages
Then I receive Mapping Packages
When I expand first package details

Expand All @@ -26,16 +26,17 @@ Feature: Mapping Packages
Then I click on submit button
Then I get success create


Scenario: Update Package
Then I search for Mapping Package
When I open actions menu
Then I edit Mapping Package
Then I update name
Then I click on submit button
Then I get success update

Scenario: Delete Package
Then I search for updated Mapping Package
When I open actions menu
When I delete Mapping Package
Then I click yes
Then I get success delete
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Feature: Mapping Packages States
Then I go to Mapping Packages
Then I get redirected to Mapping Packages list page
Then I search for Mapping Package
When I open actions menu
Then I click on View Last State
Then I receive Mapping Packages State

Expand All @@ -20,7 +21,7 @@ Feature: Mapping Packages States
Then I click on "<tab_name>" Data
Then I receive Mapping Packages Test "<tab_name>"
Examples:
| tab_name |
| Xpath |
| Sparql |
| Shacl |
| tab_name |
| Xpath |
| Sparql |
| Shacl |
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Namespaces

Scenario: Update Namespace
Then I search for Namespaces
When I open actions menu
Then I click edit Namespace button
Then I get redirected to edit page

Expand All @@ -24,6 +25,7 @@ Feature: Namespaces

Scenario: Delete Namespace
Then I search for updated Namespace
When I open actions menu
Then I click delete Namespace button
Then I get success delete

Expand All @@ -34,6 +36,8 @@ Feature: Namespaces
Then I successfully create Namespace

Scenario: Delete Custom Namespace Ontology
Then I search for updated Namespace
Then I search for Custom Namespaces
When I open actions menu
Then I click delete Custom Namespace button
Then I get success delete
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Then('I search for Custom Namespaces', () => {

Then('I click delete Custom Namespace button', () => {
cy.intercept('DELETE', appURLPrefix + 'ontology/namespaces_custom/*').as('delete')
cy.get('#ontology_namespaces_custom #delete_button').click()
cy.get('#delete_button').click()
cy.get('#yes_dialog_button').click()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ Feature: Ontology Terms

Scenario: Delete Ontology Term
Then I search for Ontology Terms
When I open actions menu
Then I click delete button
Then I get success delete
4 changes: 4 additions & 0 deletions mapping_workbench/frontend/cypress/e2e/projects.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Feature: Entry Projects
Then I get redirected to projects list page
Then I search for project

When I open actions menu
When I select project
Then I get success select

Expand All @@ -33,6 +34,7 @@ Feature: Entry Projects
Then I get redirected to projects list page
Then I search for project

When I open actions menu
When I click on edit button
Then I get redirected to project edit page
Then I update project description
Expand All @@ -48,6 +50,7 @@ Feature: Entry Projects
Then I get redirected to projects list page
Then I search for project

When I open actions menu
When I click on view button
Then I get redirected to project view page
Then I read description
Expand All @@ -61,6 +64,7 @@ Feature: Entry Projects
Then I get redirected to projects list page
Then I search for project

When I open actions menu
When I click on delete button
Then I click yes button
Then I get success delete
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feature: SHACL Test Suite
Scenario: Update SHACL Test Suite

Then I search for suite
When I open actions menu
Then I click edit button
Then I get redirected to edit page

Expand All @@ -28,5 +29,6 @@ Feature: SHACL Test Suite
Scenario: Delete SHACL Test Suite

Then I search for updated suite
When I open actions menu
Then I click delete button
Then I get success delete
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Feature: SPARQL Test Suites
Scenario: Update SPARQL Test Suite

Then I search for suite
When I open actions menu
Then I click edit button
Then I get redirected to edit page

Expand All @@ -27,5 +28,6 @@ Feature: SPARQL Test Suites
Scenario: Delete SPARQL Test Suite

Then I search for updated suite
When I open actions menu
Then I click delete button
Then I get success delete
2 changes: 2 additions & 0 deletions mapping_workbench/frontend/cypress/e2e/testDataSuites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Test Data Suites

Scenario: Update Test Data
Then I search for suite
When I open actions menu
Then I click view button
Then I click edit button
Then I get redirected to edit page
Expand All @@ -25,5 +26,6 @@ Feature: Test Data Suites

Scenario: Delete Test Data
Then I search for updated suite
When I open actions menu
Then I click delete button
Then I get success delete
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Feature: Generic Triple Maps
Then I get redirected to Generic Triple Maps

Then I search for Generic Triple Map
When I open actions menu
Then I click edit button
Then I get redirected to edit page

Expand All @@ -31,5 +32,6 @@ Feature: Generic Triple Maps
Then I get redirected to Generic Triple Maps

Then I search for updated Generic Triple Map
When I open actions menu
Then I click delete button
Then I get success delete
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Feature: Resources
Then I get redirected to Resources

Then I search for resource
When I open actions menu
Then I click edit button
Then I get redirected to edit page

Expand All @@ -31,5 +32,6 @@ Feature: Resources
Then I get redirected to Resources

Then I search for updated resource
When I open actions menu
Then I click delete button
Then I get success delete
3 changes: 2 additions & 1 deletion mapping_workbench/frontend/src/components/menu-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const MenuActions = ({children}) => {
const [anchor, setAnchor] = useState(null)
return <>
<Tooltip title='Actions'>
<IconButton onClick={e => setAnchor(e.target)}>
<IconButton id='actions-menu-button'
onClick={e => setAnchor(e.target)}>
<MoreHorizIcon/>
</IconButton>
</Tooltip>
Expand Down

0 comments on commit 5b6386c

Please sign in to comment.