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

Retrieve viz url #1907

Merged
merged 77 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
e2b0f63
set localStorage with changes from sharable URL
Huongg May 7, 2024
0be8a0a
create shared URLBox component
Huongg May 9, 2024
c9c8a57
first draft version of published content version
Huongg May 13, 2024
eef43d0
remove disclaimer content
Huongg May 13, 2024
644968c
fix width for published content
Huongg May 13, 2024
af6f96f
tidy up code
Huongg May 13, 2024
eb55d97
fix jsx error
Huongg May 13, 2024
3ad2418
update state name to showPublishedContent
Huongg May 14, 2024
4335039
linking between dropdown and populated field
Huongg May 14, 2024
ed04b74
un-disable button if populated content is ready
Huongg May 15, 2024
ac23ef5
only check data if showPublishedContent is true
Huongg May 15, 2024
3b80352
set over-hidden for the URL link
Huongg May 15, 2024
30165e5
test with local data for localStorage update
Huongg May 15, 2024
c22e1f7
update inputValues when published content is ready
Huongg May 15, 2024
cd42e35
Merge branch 'main' of github.com:kedro-org/kedro-viz into retrieve-v…
Huongg May 15, 2024
612fe29
remove mockData
Huongg May 15, 2024
ee11ee8
remove console.log
Huongg May 15, 2024
332b41d
include preview dataset
Huongg May 16, 2024
d8a6032
adding info tooltip
Huongg May 16, 2024
6a88863
merge main
Huongg May 20, 2024
68610fd
set max-width for url box
Huongg May 20, 2024
0661d32
fix sorting line for css
Huongg May 20, 2024
2199e00
include tooltip
Huongg May 20, 2024
49003c1
update current test
Huongg May 20, 2024
bd3c3ff
remove unused code and classnames
Huongg May 20, 2024
28b02af
fix the truncated url box issue
Huongg May 20, 2024
95ef01b
update failed e2e tests
Huongg May 20, 2024
9b8e2be
update type for labelText in IconButton
Huongg May 20, 2024
3c1718d
update successContent styling
Huongg May 21, 2024
29dbc9f
sorting lines
Huongg May 21, 2024
57fa21c
remove button wrapper from successContent test
Huongg May 21, 2024
7d8b9ce
remove .only in test
Huongg May 21, 2024
cc89e87
update name for content to be view
Huongg May 21, 2024
6d7470c
move showPublishedView outside the component render
Huongg May 21, 2024
c246706
update name
Huongg May 21, 2024
aaf102b
update name
Huongg May 21, 2024
c39b838
update names
Huongg May 21, 2024
541232e
fix copied button styling
Huongg May 21, 2024
3e35d30
seperate components
Huongg May 22, 2024
9c3c0b1
use shareableUrlMessages from config
Huongg May 22, 2024
f6e81e9
include gitpod in isRunningLocal
Huongg May 22, 2024
cc4291d
remove isRunningLocally for QA
Huongg May 22, 2024
ce61d28
include check for gitpod
Huongg May 22, 2024
f6ead60
update onChange name
Huongg May 22, 2024
558a6be
include gitpod in hosts
Huongg May 22, 2024
69ec462
revert changes
Huongg May 22, 2024
58d29f1
move handleResponseUrl to util
Huongg May 23, 2024
c2da3e6
first 2 e2e tests to cover new changes
Huongg May 23, 2024
93c116e
comment out the preview data
Huongg May 23, 2024
7aca861
merge main
Huongg May 23, 2024
96d650d
fix some design issue
Huongg May 23, 2024
d6054f5
fix hover state for copy button
Huongg May 23, 2024
ea220b6
fix dropdown background colour
Huongg May 27, 2024
88bb3ce
fix copied error
Huongg May 27, 2024
33200b5
fix design feedback
Huongg Jun 3, 2024
e4d6c21
Merge branch 'main' of github.com:kedro-org/kedro-viz into retrieve-v…
Huongg Jun 3, 2024
f302f55
include missing import React
Huongg Jun 3, 2024
301da67
Abstract fecth function
Huongg Jun 4, 2024
7fdc220
un-comment the preview data section
Huongg Jun 4, 2024
042e715
remove updatelocalstorage outside success
Huongg Jun 4, 2024
4b55a88
remove css comments
Huongg Jun 4, 2024
580f15d
update release note
Huongg Jun 4, 2024
d60167c
update e2e tests
Huongg Jun 4, 2024
8c06a8d
update toggle value name
Huongg Jun 4, 2024
4431ff0
update component name and fix compatible issue
Huongg Jun 5, 2024
aa3c120
push the current state to the first of localStorage list
Huongg Jun 5, 2024
2422739
update local variable names
Huongg Jun 5, 2024
3a1cb44
revert the update localStorage state
Huongg Jun 5, 2024
a15492b
update release note
Huongg Jun 5, 2024
4c01960
update name deployVix
Huongg Jun 5, 2024
09648e6
update setToggle name
Huongg Jun 5, 2024
242d38c
fix typo
Huongg Jun 5, 2024
0543139
fix typo and update variables names
Huongg Jun 6, 2024
f7e486a
update the order in test
Huongg Jun 6, 2024
1d0668c
set form with localStorage data
Huongg Jun 6, 2024
381c261
remove create fucntion and set the state directly
Huongg Jun 6, 2024
54cf5ee
fix the order not updated
Huongg Jun 6, 2024
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
47 changes: 15 additions & 32 deletions cypress/tests/ui/flowchart/shareable-urls.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
describe('Shareable URLs', () => {
it('verifies that users can open the Deploy Kedro-Viz modal. #TC-52', () => {
describe('Shareable URLs with empty localStorage', () => {
beforeEach(() => {
// Clears localStorage before each test
cy.clearLocalStorage();
});

it('verifies that users can open the Deploy Kedro-Viz modal if the localStorage is empty. #TC-52', () => {
// Intercept the network request to mock with a fixture
cy.__interceptRest__(
'/api/package-compatibilities',
Expand All @@ -10,7 +15,6 @@ describe('Shareable URLs', () => {
// Action
cy.reload();
cy.get('.pipeline-menu-button--deploy').click({ force: true });
cy.get('[data-test="disclaimerButton"]').click({ force: true });

// Assert after action
cy.get('.shareable-url-modal .modal__wrapper').contains(
Expand Down Expand Up @@ -39,7 +43,6 @@ describe('Shareable URLs', () => {
it('verifies that shareable url modal closes on close button click #TC-54', () => {
// Action
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal__button-wrapper button')
.contains('Cancel')
.click();
Expand All @@ -56,7 +59,6 @@ describe('Shareable URLs', () => {

// Action
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal [data-test=kedro-pipeline-selector]').click();

// Assert after action
Expand All @@ -72,13 +74,14 @@ describe('Shareable URLs', () => {

// Action
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();

// Assert after action
cy.get(
'.shareable-url-modal [data-test=kedro-pipeline-selector] .dropdown__label span'
).contains(selectedPlatform);
cy.get('.shareable-url-modal input').should('have.value', '');
cy.get(
'.shareable-url-modal .shareable-url-modal__input-wrapper input'
).should('have.value', '');
cy.get('.shareable-url-modal__button-wrapper button')
.contains(primaryButtonNodeText)
.should('be.disabled');
Expand All @@ -89,14 +92,15 @@ describe('Shareable URLs', () => {

// Action
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal [data-test=kedro-pipeline-selector]').click();
cy.get('.shareable-url-modal .dropdown__options section div')
.first()
.click();

// Assert after action
cy.get('.shareable-url-modal input').should('have.value', '');
cy.get(
'.shareable-url-modal .shareable-url-modal__input-wrapper input'
).should('have.value', '');
cy.get('.shareable-url-modal__button-wrapper button')
.contains(primaryButtonNodeText)
.should('be.disabled');
Expand All @@ -109,7 +113,6 @@ describe('Shareable URLs', () => {

// Action
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal [data-test=kedro-pipeline-selector]').click();
cy.get('.shareable-url-modal .dropdown__options section div')
.first()
Expand All @@ -131,7 +134,6 @@ describe('Shareable URLs', () => {
const primaryButtonNodeText = 'Publish';
// Action
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal [data-test=kedro-pipeline-selector]').click();
cy.get('.shareable-url-modal .dropdown__options section div')
.first()
Expand Down Expand Up @@ -165,7 +167,6 @@ describe('Shareable URLs', () => {
// Action
cy.reload();
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal [data-test=kedro-pipeline-selector]').click();
cy.get('.shareable-url-modal .dropdown__options section div')
.first()
Expand All @@ -181,18 +182,14 @@ describe('Shareable URLs', () => {
// Wait for the POST request to complete and check the mocked response
cy.wait('@publishRequest').then((interception) => {
// Assert after action
cy.get('.shareable-url-modal__result-url').contains(
interception.response.body.url
);
cy.get('.url-box__result-url').contains(interception.response.body.url);
});
});

it('verifies that AWS link is generated with correct inputs on Republish button click #TC-61', () => {
const bucketName = 'myBucketName';
const endpointName = 'http://www.example.com';
const primaryButtonNodeText = 'Publish';
const primaryButtonNodeTextVariant = 'Publish';
const secondaryButtonNodeText = 'Link Settings';

// Intercept the network request to mock with a fixture
cy.__interceptRest__(
Expand All @@ -204,7 +201,6 @@ describe('Shareable URLs', () => {
// Action
cy.reload();
cy.get('.pipeline-menu-button--deploy').click();
cy.get('[data-test="disclaimerButton"]').click();
cy.get('.shareable-url-modal [data-test=kedro-pipeline-selector]').click();
cy.get('.shareable-url-modal .dropdown__options section div')
.first()
Expand All @@ -217,23 +213,10 @@ describe('Shareable URLs', () => {
.contains(primaryButtonNodeText)
.click();

// Wait for the POST request to complete
cy.wait('@publishRequest');

// Action
cy.get('.shareable-url-modal__button-wrapper button')
.contains(secondaryButtonNodeText)
.click();
cy.get('.shareable-url-modal__button-wrapper button')
.contains(primaryButtonNodeTextVariant)
.click();

// Wait for the POST request to complete and check the mocked response
cy.wait('@publishRequest').then((interception) => {
// Assert after action
cy.get('.shareable-url-modal__result-url').contains(
interception.response.body.url
);
cy.get('.url-box__result-url').contains(interception.response.body.url);
});
});
});
9 changes: 9 additions & 0 deletions src/components/icons/info.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading