-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/1929-Create_checkbox-_and_radio-Cards_w…
…eb_components # Conflicts: # packages/components-angular/projects/consumer-app/src/app/app.component.html # packages/components/package.json # pnpm-lock.yaml
- Loading branch information
Showing
83 changed files
with
3,526 additions
and
2,799 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,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Adjusted focus styles with new color for button, checkbox, radio, switch, rating elements. |
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,7 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
'@swisspost/design-system-migrations': patch | ||
'@swisspost/design-system-demo': patch | ||
--- | ||
|
||
Updated instructions to run the automated migrations from the migration package. |
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,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
'@swisspost/design-system-demo': patch | ||
--- | ||
|
||
Changed references from https://next.design-system.post.ch to https://design-system.post.ch after the migration of Storybook, which is now our main documentation |
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,7 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-components': minor | ||
'@swisspost/design-system-styles': minor | ||
--- | ||
|
||
Added a new `tag` component. This component is available in standard HTML or as webcomponent. |
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,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Replace all parts that used the old success color with the new success-green color. |
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,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
--- | ||
|
||
Renamed input range to slider. |
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,5 @@ | ||
--- | ||
'@swisspost/internet-header': patch | ||
--- | ||
|
||
Fixed an issue with invisible focus rings when not using the Design System Styles along with the Swisspost Internet Header. Focus rings are now displayed as expected. |
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 |
---|---|---|
|
@@ -34,14 +34,20 @@ jobs: | |
- name: Install & build dependencies | ||
run: pnpm bootstrap | ||
|
||
- name: Prepare Cypress – Spawn Xvfb server | ||
run: Xvfb :99 & | ||
|
||
- name: Prepare Cypress – Share Xvfb server as environment variable | ||
run: export DISPLAY=:99 | ||
|
||
- name: Cypress info | ||
run: pnpm --filter design-system-documentation exec cypress info | ||
|
||
- name: Run tests | ||
run: pnpm e2e:ci | ||
|
||
- name: Upload screenshots | ||
uses: actions/[email protected].0 | ||
uses: actions/[email protected].1 | ||
if: failure() | ||
with: | ||
name: cypress-snapshots | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
const TAG_ID = '516917c9-ad12-484c-8bbd-e270e412f713'; | ||
|
||
describe('Tag', () => { | ||
describe('Structure & Props', () => { | ||
beforeEach(() => { | ||
cy.getComponent('tag', TAG_ID); | ||
cy.get('@tag').find('.tag').as('wrapper'); | ||
cy.get('@wrapper').find('.tag-text').as('text'); | ||
}); | ||
|
||
it('should render', () => { | ||
cy.get('@tag').should('exist'); | ||
}); | ||
|
||
it('should use variant `gray` as default', () => { | ||
const defaultClasses = ['tag', 'tag-gray']; | ||
|
||
cy.get('@tag').should('not.have.attr', 'variant'); | ||
cy.get('@wrapper').should('satisfy', $el => { | ||
const classList = Array.from($el[0].classList); | ||
return defaultClasses.every(c => classList.includes(c)); | ||
}); | ||
}); | ||
|
||
it('should set the tags bg-color according to the prop `variant`', () => { | ||
['gray', 'white', 'info', 'success', 'danger', 'warning', 'yellow'].forEach(bg => { | ||
cy.get('@tag').invoke('attr', 'variant', bg).should('have.attr', 'variant', bg); | ||
cy.get('@wrapper').should('have.class', `tag-${bg}`); | ||
}); | ||
}); | ||
|
||
it('should set the tags size according to the prop `size`', () => { | ||
cy.get('@tag').should('not.have.attr', 'size'); | ||
cy.get('@tag').invoke('attr', 'size', 'sm'); | ||
cy.get('@wrapper').should('have.class', 'tag-sm'); | ||
}); | ||
|
||
it('should set the tags icon according to the prop `icon`', () => { | ||
cy.get('@tag').should('not.have.attr', 'icon'); | ||
cy.get('@tag').find('post-icon').should('not.exist'); | ||
cy.get('@tag').invoke('attr', 'icon', '1000'); | ||
cy.get('@tag').find('post-icon').as('icon'); | ||
cy.get('@icon').should('exist'); | ||
}); | ||
|
||
it('should use `default` slot for content', () => { | ||
cy.get('@tag') | ||
.invoke('append', '<img src="/favicon.svg" alt="favicon"/>') | ||
.find('img[src="/favicon.svg"]') | ||
.then($img => { | ||
cy.get('@wrapper') | ||
.find('slot') | ||
.then($slot => { | ||
const img = $img.get(0); | ||
const slot = $slot.get(0); | ||
|
||
expect(img.assignedSlot).to.equal(slot); | ||
expect(slot.assignedElements()[0]).to.equal(img); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('Accessibility', () => { | ||
it('Has no detectable a11y violations on load for all variants', () => { | ||
cy.getSnapshots('post-tag'); | ||
cy.checkA11y('#root-inner'); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.