From 6917f50b319c295f624a0b84e87cafbec665b7e1 Mon Sep 17 00:00:00 2001 From: "boyan.tonchev" Date: Wed, 15 Feb 2023 18:15:33 +0200 Subject: [PATCH] Added tooltip to run query button. --- cypress/e2e/editor-actions/execute-query.spec.cy.ts | 1 + cypress/steps/yasqe-steps.ts | 4 ++++ ontotext-yasgui-web-component/src/i18n/locale-en.json | 1 + ontotext-yasgui-web-component/src/i18n/locale-fr.json | 1 + 4 files changed, 7 insertions(+) diff --git a/cypress/e2e/editor-actions/execute-query.spec.cy.ts b/cypress/e2e/editor-actions/execute-query.spec.cy.ts index f9ab0106..1fbe8ead 100644 --- a/cypress/e2e/editor-actions/execute-query.spec.cy.ts +++ b/cypress/e2e/editor-actions/execute-query.spec.cy.ts @@ -11,6 +11,7 @@ describe('Execute query action', () => { it('Should be able to execute a query', () => { ActionsPageSteps.visit(); + YasqeSteps.getExecuteQueryButtonTooltip().should('have.attr', 'data-tooltip', 'Run query'); YasqeSteps.getExecuteQueryButton().should('be.visible'); YasqeSteps.executeQuery(); YasrSteps.getResults().should('have.length', 36); diff --git a/cypress/steps/yasqe-steps.ts b/cypress/steps/yasqe-steps.ts index acc2940c..db0999a2 100644 --- a/cypress/steps/yasqe-steps.ts +++ b/cypress/steps/yasqe-steps.ts @@ -35,6 +35,10 @@ export class YasqeSteps { return cy.get('.yasqe_queryButton'); } + static getExecuteQueryButtonTooltip() { + return this.getExecuteQueryButton().parent(); + } + static executeQuery(index = 0) { this.getExecuteQueryButton().eq(index).click(); } diff --git a/ontotext-yasgui-web-component/src/i18n/locale-en.json b/ontotext-yasgui-web-component/src/i18n/locale-en.json index ba55cee5..9bf37961 100644 --- a/ontotext-yasgui-web-component/src/i18n/locale-en.json +++ b/ontotext-yasgui-web-component/src/i18n/locale-en.json @@ -31,6 +31,7 @@ "yasqe.action.curl.btn.label": "CURL", "yasqe.action.run_query.btn.label": "Run", "yasqe.action.run_query.btn.tooltip": "Run query", + "yasqe.action.run_query.btn.disabled.tooltip": "Querying is disabled.", "yasqe.action.share.btn.tooltip": "Share your query", "yasqe.action.share.error.general_message": "An error has occurred", "yasqe.action.shorten.btn.label": "Shorten", diff --git a/ontotext-yasgui-web-component/src/i18n/locale-fr.json b/ontotext-yasgui-web-component/src/i18n/locale-fr.json index d8b8c4e0..656e2180 100644 --- a/ontotext-yasgui-web-component/src/i18n/locale-fr.json +++ b/ontotext-yasgui-web-component/src/i18n/locale-fr.json @@ -31,6 +31,7 @@ "yasqe.action.curl.btn.label": "CURL", "yasqe.action.run_query.btn.label": "Exécuter", "yasqe.action.run_query.btn.tooltip": "Run query", + "yasqe.action.run_query.btn.disabled.tooltip": "Querying is disabled.", "yasqe.action.share.btn.tooltip": "Partagez votre requête", "yasqe.action.share.error.general_message": "An error has occurred", "yasqe.action.shorten.btn.label": "Raccourcir",