Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUR-17054 #1642

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/components/computed-properties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
header-class="m-0 p-0 mb-3"
body-class="m-0 p-0"
title-class="m-0"
footer-class="m-0 p-0"
footer-class="m-0 p-0 border-0"
no-close-on-backdrop
header-close-content="×"
data-cy="calcs-modal"
Expand All @@ -25,6 +25,7 @@
</template>
<template v-if="displayList">
<Sortable
class="mb-3"
:fields="fields"
:items="current"
filter-key="name,type"
Expand Down Expand Up @@ -55,7 +56,15 @@
</Sortable>

<template slot="modal-footer">
<span />
<div class="d-flex align-items-end">
<button
class="btn btn-secondary ml-3 text-uppercase"
data-cy="calcs-button-close"
@click="$refs.modal.hide()"
>
{{ $t("Done") }}
</button>
</div>
</template>
</template>

Expand Down Expand Up @@ -148,14 +157,14 @@
<template slot="modal-footer">
<div class="d-flex align-items-end">
<button
class="btn btn-outline-secondary"
class="btn btn-outline-secondary text-uppercase"
data-cy="calcs-button-cancel"
@click="displayTableList"
>
{{ $t("Cancel") }}
</button>
<button
class="btn btn-secondary ml-3"
class="btn btn-secondary ml-3 text-uppercase"
data-cy="calcs-button-save"
@click="validateData"
>
Expand Down
9 changes: 6 additions & 3 deletions src/components/sortable/sortableList/SortableList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
<div
v-for="field in fields"
:key="field.key"
class="sortable-list-td sortable-list-header"
class="sortable-list-td"
>
{{ field.label }}
<span class="sortable-list-separator">&nbsp;</span>
<span class="sortable-list-header">{{ field.label }}</span>
</div>
<div class="sortable-list-td">
<span class="sortable-list-separator">&nbsp;</span>
</div>
<div class="sortable-list-td"></div>
</div>
<div
v-for="(item, index) in sortedItems"
Expand Down
13 changes: 11 additions & 2 deletions src/components/sortable/sortableList/sortableList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ $border-color: #cdddee;
&-td {
display: table-cell;
border-bottom: 1px solid $border-color;
white-space: nowrap;

&:first-child {
width: 9%;
width: 60px;
}

&:nth-child(2) {
width: 40%;
width: 30%;
}

&:not(:first-child):not(:nth-child(2)):not(:last-child) {
Expand All @@ -43,6 +44,14 @@ $border-color: #cdddee;
font-weight: 700;
color: #566877;
text-transform: uppercase;
display: inline-block;
white-space: normal;
}
&-separator {
border-left: 1px solid $border-color;
display: inline-block;
padding: 0.5rem 0rem;
width: 1px;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/watchers-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,14 @@

<div class="d-flex justify-content-end mt-3">
<button
class="btn btn-outline-secondary"
class="btn btn-outline-secondary text-uppercase"
data-cy="watchers-button-cancel"
@click.stop="displayTableList"
>
{{ $t("Cancel") }}
</button>
<button
class="btn btn-secondary ml-3"
class="btn btn-secondary ml-3 text-uppercase"
data-cy="watchers-button-save"
@click="validateDataAndSave"
>
Expand Down
16 changes: 14 additions & 2 deletions src/components/watchers-popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@
@delete-form="confirmRemoval"
@toggle-bypass="toggleBypass"
@ordered="$emit('input', $event)"
/>
/>

<div class="d-flex justify-content-end mt-3 mr-1">
<div class="d-flex align-items-end">
<button
class="btn btn-secondary ml-3 text-uppercase"
data-cy="calcs-button-close"
@click="$refs.modal.hide()"
>
{{ $t("Done") }}
</button>
</div>
</div>
</template>
<template v-else>
<required />
Expand Down Expand Up @@ -74,7 +86,7 @@ export default {
},
computed: {
modalSize() {
return this.enableList ? "lg" : "xl";
return "xl";
},
},
watch: {
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/specs/Watchers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ describe("Watchers", () => {
cy.get("@watcherModal").should("have.class", "modal-xl");
cy.get('[data-cy="watchers-button-cancel"]').click();

cy.get("@watcherModal").should("have.class", "modal-lg");
// Watcher list is also xl because it has many columns
cy.get("@watcherModal").should("have.class", "modal-xl");
});
it("Test asynchronous watcher", () => {
// Mock script response
Expand Down
Loading