Skip to content

Commit f446976

Browse files
committed
attempt at loading css for cypress tests
Signed-off-by: Polymeta <[email protected]>
1 parent 4930e54 commit f446976

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

packages/ui/cypress/support/component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import "./commands";
2121
// require('./commands')
2222

2323
import { mount as mount2 } from "cypress/vue2";
24+
import "../../src/styles/main.scss";
2425

2526
// Augment the Cypress namespace to include type definitions for
2627
// your custom command.

packages/ui/src/components/general/loader/loader.cy.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ const CustomLoaderWrapper = defineComponent({
3535
</div>`
3636
});
3737

38+
/**
39+
* Wrapper for testing the loader with a custom variant
40+
*/
41+
const VariantLoaderWrapper = defineComponent({
42+
components: { ForgeLoader },
43+
44+
template: `
45+
<div>
46+
<forge-loader id="testLoader" variant="info" />
47+
</div>`
48+
});
49+
3850
/***************************************************
3951
************* END OF WRAPPER SETUP ****************
4052
**************************************************/
@@ -66,6 +78,17 @@ it("mounts custom loader", () => {
6678
cy.get(".sr-only").should("have.text", CustomLoadingMessage);
6779
});
6880

81+
/**
82+
* Tests the custom loader mounts correctly with valid custom text
83+
*/
84+
it("mounts custom loader", () => {
85+
cy.wait(500);
86+
mount(VariantLoaderWrapper as any);
87+
cy.get("#testLoader").should("exist");
88+
cy.get("#testLoader").should("be.visible");
89+
cy.get("#testLoader > span").should("have.class", "text-info");
90+
});
91+
6992
/***************************************************
7093
***************** END OF TESTS ********************
7194
**************************************************/

packages/ui/src/styles/datepicker.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'node_modules/flatpickr/dist/flatpickr.min';
1+
@import 'flatpickr/dist/flatpickr.min';
22

33
input.flatpickr-input[readonly],
44
.flatpickr-wrapper input.form-control[readonly] {

packages/ui/src/styles/forge.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import "variables";
2-
@import 'node_modules/bootstrap/scss/bootstrap';
3-
@import 'node_modules/bootstrap-vue/src/index.scss';
2+
@import 'bootstrap/scss/bootstrap';
3+
@import 'bootstrap-vue/src/index.scss';
44

55

66
@each $color, $value in $grays {

packages/ui/src/styles/multiselect.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'node_modules/vue-multiselect/dist/vue-multiselect.min';
1+
@import 'vue-multiselect/dist/vue-multiselect.min';
22

33
.multiselect {
44
box-sizing: content-box;

0 commit comments

Comments
 (0)