CSR-818: undo previous commit
This commit is contained in:
parent
d34d291c7b
commit
f893692346
3 changed files with 17 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
|||
:buttonText="buttonText"
|
||||
loaderColor="white"
|
||||
:class="isForwardActionDisabled && 'form-test-invalid'"
|
||||
:aria-disabled="isForwardActionDisabled"
|
||||
:isDisabled="isForwardActionDisabled"
|
||||
@click-event="buttonClick"
|
||||
data-bs-target="#footerModal"
|
||||
|
|
@ -84,7 +85,6 @@ export default {
|
|||
};
|
||||
},
|
||||
buttonClick() {
|
||||
if (this.isForwardActionDisabled) { return false }
|
||||
//prevent keyboard input after button click
|
||||
document.onkeydown = function (e) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,21 @@ describe("buttonMain.vue", () => {
|
|||
expect(button.attributes("class")).toContain("btn-primary");
|
||||
});
|
||||
|
||||
it("Should return aria-disabled state", async () => {
|
||||
// Act
|
||||
const wrapper = shallowMount(buttonMain, setupMocks({
|
||||
propsData: {
|
||||
isDisabled: true,
|
||||
},
|
||||
}));
|
||||
|
||||
// Assert
|
||||
const button = wrapper.find("button");
|
||||
|
||||
// Expect
|
||||
expect(button.attributes()["aria-disabled"]).toEqual("true");
|
||||
});
|
||||
|
||||
it("Should return loader color", async () => {
|
||||
// Act
|
||||
const wrapper = shallowMount(buttonMain, setupMocks({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<button
|
||||
:aria-disabled="isDisabled"
|
||||
class="btn d-flex align-items-center py-3 px-4 delay"
|
||||
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '', isLoaderDisplayed ? 'has-loader' : '']"
|
||||
@click="clicked()"
|
||||
|
|
|
|||
Loading…
Reference in a new issue