-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
405826e
commit 8563187
Showing
9 changed files
with
78 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"has_missing_dependencies": false, | ||
"package_compatibilities": [ | ||
{ | ||
"package_name": "fsspec", | ||
"package_version": "2023.9.1", | ||
"is_compatible": true | ||
}, | ||
{ | ||
"package_name": "kedro-datasets", | ||
"package_version": "2.0.0", | ||
"is_compatible": true | ||
} | ||
] | ||
} |
15 changes: 9 additions & 6 deletions
15
...package-compatibilities-incompatible.json → ...s/fixtures/mock/inCompatibleMetadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
[ | ||
{ | ||
{ | ||
"has_missing_dependencies": true, | ||
"package_compatibilities": [ | ||
{ | ||
"package_name": "fsspec", | ||
"package_version": "2023.8.1", | ||
"is_compatible": false | ||
}, | ||
{ | ||
}, | ||
{ | ||
"package_name": "kedro-datasets", | ||
"package_version": "1.8.0", | ||
"is_compatible": false | ||
} | ||
] | ||
} | ||
] | ||
} |
12 changes: 0 additions & 12 deletions
12
cypress/fixtures/mock/package-compatibilities-compatible.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe('Banners in Kedro-Viz', () => { | ||
beforeEach(() => { | ||
// Clears localStorage before each test | ||
cy.clearLocalStorage(); | ||
}); | ||
|
||
it("shows a missing dependencies banner in viz lite mode if the kedro project dependencies are not installed.", () => { | ||
// Intercept the network request to mock with a fixture | ||
cy.__interceptRest__( | ||
'/api/metadata', | ||
'GET', | ||
'/mock/inCompatibleMetadata.json' | ||
).as("appMetadata"); | ||
|
||
// Action | ||
cy.reload(); | ||
|
||
// Assert after action | ||
cy.get('[data-test="flowchart-wrapper--lite-banner"]').should('exist'); | ||
cy.get('.banner-message-body').should('contains.text', 'please install the missing Kedro project dependencies') | ||
cy.get('.banner-message-title').should('contains.text', 'Missing dependencies') | ||
|
||
// Test Learn more link | ||
cy.get(".banner a") | ||
.should("contains.attr", "href", "https://docs.kedro.org/projects/kedro-viz/en/latest/kedro-viz_visualisation.html#visualise-a-kedro-project-without-installing-project-dependencies"); | ||
|
||
// Close the banner | ||
cy.get(".banner-close").click() | ||
cy.get('[data-test="flowchart-wrapper--lite-banner"]').should('not.exist'); | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters