-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDB-7820 introduce saved query edit operation (#47)
## What This MR introduces support for editing of saved queries. ## Why GDB workbench supports functionality for saving sparql queries as well as managing the saved queries like editing them. ## How * Introduced the edit query action in the saved queries popup as well as respective handlers in the ontotext yasgui component. * Extended models and improved the save query handling. * Implemented tests.
- Loading branch information
1 parent
89fa003
commit 38705d5
Showing
18 changed files
with
2,957 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {YasqeSteps} from "../../steps/yasqe-steps"; | ||
import {QueryStubs} from "../../stubs/query-stubs"; | ||
import ActionsPageSteps from "../../steps/actions-page-steps"; | ||
|
||
describe('Edit saved query action', () => { | ||
beforeEach(() => { | ||
QueryStubs.stubDefaultQueryResponse(); | ||
// Given I have opened a page with the yasgui | ||
// And there is an open tab with sparql query in it | ||
ActionsPageSteps.visit(); | ||
}); | ||
|
||
it('Should be able to edit saved query', () => { | ||
// Given I have opened the saved queries popup | ||
YasqeSteps.showSavedQueries(); | ||
YasqeSteps.getSavedQueriesPopup().should('be.visible'); | ||
// When I hover on any query name in the list | ||
YasqeSteps.editQuery(4); | ||
// Then I expect to see the edit query action | ||
YasqeSteps.getSaveQueryDialog().should('be.visible'); | ||
YasqeSteps.getQueryNameField().should('have.value', 'q2'); | ||
YasqeSteps.getQueryField().should('have.value', 'select * where { \n\t?s ?p ?o .\n} limit 100 \n'); | ||
YasqeSteps.getIsPublicField().should('not.be.checked'); | ||
// When I change the query data | ||
YasqeSteps.writeQueryName('-new'); | ||
YasqeSteps.clearQueryField(); | ||
YasqeSteps.writeQuery('select *'); | ||
YasqeSteps.toggleIsPublic(); | ||
// And I save the query | ||
YasqeSteps.saveQuery(); | ||
// Then I expect that the query is saved | ||
YasqeSteps.getSaveQueryDialog().should('not.exist'); | ||
YasqeSteps.getSavedQueriesPopup().should('not.exist'); | ||
ActionsPageSteps.getSaveQueryPayload().should('contain.value', '{"queryName":"q2-new","query":"select *","isPublic":true}'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,11 @@ | |
], | ||
"types": [ | ||
"cypress", | ||
"node" | ||
"node", | ||
"cypress-real-events" | ||
] | ||
}, | ||
"include": [ | ||
"**/*.ts" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.