Skip to content

Commit

Permalink
Force cypress to type to bypass tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
anvit committed Apr 15, 2024
1 parent 4c16dc0 commit c14e43f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/descriptions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Descriptions', () => {
cy.visit('/informationobject/add')
cy.contains('Identity area').click()
cy.get('input#identifier').type('123')
cy.get('input#title').type('Test description A')
cy.get('input#title').type('Test description A', {force: true})
cy.get('#main-column form').submit()

cy.get('#main-column > h1').contains('123 - Test description A')
Expand Down
8 changes: 3 additions & 5 deletions plugins/arDominionB5Plugin/js/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import Tooltip from "bootstrap/js/dist/tooltip";

$(() => {
$("body.edit.show-edit-tooltips [id$=-help]").each((_, el) => {
console.log("Here");
$(el)
.prevAll(":not([type=hidden]):first")
.attr({ "data-bs-toggle": "tooltip", title: el.textContent.trim() });
.attr({ "data-bs-toggle": "tooltip", title: el.textContent.trim() })
.attr({ "data-bs-placement": "left" });
});

$("[data-bs-toggle=tooltip]").each(
(_, el) => new Tooltip(el, { placement: "right" })
);
$("[data-bs-toggle=tooltip]").each((_, el) => new Tooltip(el));
});
})(jQuery);

0 comments on commit c14e43f

Please sign in to comment.