-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes how config management works in hiccup (#59)
* Changes how config management works in hiccup * Update version
- Loading branch information
Showing
99 changed files
with
3,403 additions
and
2,393 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
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
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,16 +1,9 @@ | ||
describe('Migrations', () => { | ||
beforeEach(() => {}) | ||
|
||
it('should be able to able to migrate - v1 to v2', () => { | ||
cy.fixture('v1-config').then((fixture) => | ||
localStorage.setItem('hiccup_config', JSON.stringify(fixture)) | ||
) | ||
it('should be able to able to migrate - v1 to latest', () => { | ||
cy.intercept('GET', '**/configs/config.json', { fixture: 'v1-config' }) | ||
cy.visit('http://localhost:3000') | ||
cy.intercept('GET', '**/configs/config.json', { fixture: 'default' }) | ||
cy.findAllByTestId('featured-card').first().contains('V1 Config') | ||
cy.clickSettings() | ||
cy.findByTestId('file-viewer').find('#title').should('contain', 'Recovered') | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
expect(localStorage.getItem('hiccup_config')).to.be.null | ||
}) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "0.1.0", | ||
"configs": [ | ||
{ | ||
"id": "default", | ||
"title": "Default Config", | ||
"remote": { | ||
"type": "url", | ||
"url": "./configs/config.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,88 +1,85 @@ | ||
{ | ||
"version": "2.0", | ||
"id": "default", | ||
"title": "Default Config", | ||
"url": "http://localhost:3000/configs/config.json", | ||
"featured": [ | ||
"version": "3.0.0", | ||
"defaultTitle": "Default Config", | ||
"url": "http://localhost:3000/configs/config.json", | ||
"featured": [ | ||
{ | ||
"name": "Featured Link", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "Another Featured link", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "One more", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "welcome to hiccup", | ||
"background": "/assets/card.png", | ||
"link": "https://github.com/ashwin-pc/hiccup", | ||
"tags": "space separated tags" | ||
} | ||
], | ||
"categories": [ | ||
{ | ||
"title": "Category 1", | ||
"links": [ | ||
{ | ||
"name": "Featured Link", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "Another Featured link", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
"name": "Link 2", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Category 2", | ||
"links": [ | ||
{ | ||
"name": "One more", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "welcome to hiccup", | ||
"background": "/assets/card.png", | ||
"link": "https://github.com/ashwin-pc/hiccup", | ||
"tags": "space separated tags" | ||
"name": "Link 2", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Category 3", | ||
"links": [ | ||
{ | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup", | ||
"tags": "more searchable tags" | ||
} | ||
], | ||
"categories": [ | ||
] | ||
}, | ||
{ | ||
"title": "Category 4", | ||
"links": [ | ||
{ | ||
"title": "Category 1", | ||
"links": [ | ||
{ | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "Link 2", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
] | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"title": "Category 2", | ||
"links": [ | ||
{ | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "Link 2", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
] | ||
"name": "Link 2", | ||
"link": "https://www.google.com/search?q=I%27m+Feeling+Curious&csf=b&ct=ifl&cad=2:curious&ei=iin8XpLlKJi80PEPi9GtyAo&ved=0ahUKEwiS0oCHs6vqAhUYHjQIHYtoC6kQnRsIDg&rct=j" | ||
}, | ||
{ | ||
"title": "Category 3", | ||
"links": [ | ||
{ | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup", | ||
"tags": "more searchable tags" | ||
} | ||
] | ||
"name": "Link 3", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"title": "Category 4", | ||
"links": [ | ||
{ | ||
"name": "Link 1", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "Link 2", | ||
"link": "https://www.google.com/search?q=I%27m+Feeling+Curious&csf=b&ct=ifl&cad=2:curious&ei=iin8XpLlKJi80PEPi9GtyAo&ved=0ahUKEwiS0oCHs6vqAhUYHjQIHYtoC6kQnRsIDg&rct=j" | ||
}, | ||
{ | ||
"name": "Link 3", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
}, | ||
{ | ||
"name": "Just a long link name to make sure we are safe", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
] | ||
"name": "Just a long link name to make sure we are safe", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
], | ||
"metadata": { | ||
"readonly": false | ||
] | ||
} | ||
} | ||
], | ||
"metadata": {} | ||
} |
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,14 +1,13 @@ | ||
{ | ||
"version": "2.0", | ||
"id": "dummy", | ||
"title": "Dummy Config", | ||
"url": "http://dummyconfig.com", | ||
"featured": [ | ||
{ | ||
"name": "This is a dummy config", | ||
"background": "/assets/card.png", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
], | ||
"categories": [] | ||
} | ||
"version": "3.0.0", | ||
"defaultTitle": "Dummy Config", | ||
"url": "http://dummyconfig.com", | ||
"featured": [ | ||
{ | ||
"name": "This is a dummy config", | ||
"background": "/assets/card.png", | ||
"link": "https://designedbyashw.in/test/hiccup" | ||
} | ||
], | ||
"categories": [] | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.