-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
21 changed files
with
979 additions
and
11 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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": patch | ||
--- | ||
|
||
Allow toggling the http protocol in mt-url-field using the keyboard |
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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": minor | ||
--- | ||
|
||
Add mt-url-field |
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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": patch | ||
--- | ||
|
||
Disable mt-url-field when inheritance is linked |
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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": patch | ||
--- | ||
|
||
Stop emitting update:modelValue event when component gets created |
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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": patch | ||
--- | ||
|
||
Do not change the http protocol in mt-url-field when clicking the protocol button and the input field is inherited |
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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": patch | ||
--- | ||
|
||
Allow mt-url-field to be required |
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 @@ | ||
--- | ||
"@shopware-ag/meteor-component-library": patch | ||
--- | ||
|
||
emit update:modelValue every time the user types into the mt-url-field |
Binary file added
BIN
+6.46 KB
..._snapshots__/interaction-tests-form-mt-url-field--visual-test-disabled-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.68 KB
...y/__snapshots__/interaction-tests-form-mt-url-field--visual-test-error-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.05 KB
...__snapshots__/interaction-tests-form-mt-url-field--visual-test-focused-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.23 KB
...ry/__snapshots__/interaction-tests-form-mt-url-field--visual-test-http-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.44 KB
...y/__snapshots__/interaction-tests-form-mt-url-field--visual-test-https-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.84 KB
...__/interaction-tests-form-mt-url-field--visual-test-linked-inheritance-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.45 KB
...y/__snapshots__/interaction-tests-form-mt-url-field--visual-test-small-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.44 KB
.../__snapshots__/interaction-tests-form-mt-url-field--visual-test-suffix-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.86 KB
.../interaction-tests-form-mt-url-field--visual-test-unlinked-inheritance-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions
85
...es/component-library/src/components/form/mt-url-field/mt-url-field.interactive.stories.ts
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,85 @@ | ||
import { userEvent, within } from "@storybook/test"; | ||
import meta, { type MtUrlFieldMeta, type MtUrlFieldStory } from "./mt-url-field.stories"; | ||
|
||
export default { | ||
...meta, | ||
title: "Interaction Tests/Form/mt-url-field", | ||
} as MtUrlFieldMeta; | ||
|
||
export const VisualTestFocused: MtUrlFieldStory = { | ||
name: "Focused", | ||
args: { | ||
modelValue: "https://example.com", | ||
}, | ||
async play({ canvasElement }) { | ||
const canvas = within(canvasElement); | ||
|
||
await userEvent.click(canvas.getByRole("textbox")); | ||
}, | ||
}; | ||
|
||
export const VisualTestHttps: MtUrlFieldStory = { | ||
name: "shows HTTPS mode", | ||
args: { | ||
modelValue: "https://example.com", | ||
}, | ||
}; | ||
|
||
export const VisualTestHttp: MtUrlFieldStory = { | ||
name: "shows HTTP mode", | ||
args: { | ||
modelValue: "http://example.com", | ||
}, | ||
}; | ||
|
||
export const VisualTestDisabled: MtUrlFieldStory = { | ||
name: "Disabled", | ||
args: { | ||
modelValue: "https://example.com", | ||
disabled: true, | ||
}, | ||
}; | ||
|
||
export const VisualTestLinkedInheritance: MtUrlFieldStory = { | ||
name: "Linked inheritance", | ||
args: { | ||
modelValue: "https://example.com", | ||
isInheritanceField: true, | ||
isInherited: true, | ||
}, | ||
}; | ||
|
||
export const VisualTestUnlinkedInheritance: MtUrlFieldStory = { | ||
name: "Linked inheritance", | ||
args: { | ||
modelValue: "https://example.com", | ||
isInheritanceField: true, | ||
isInherited: false, | ||
}, | ||
}; | ||
|
||
export const VisualTestSuffix: MtUrlFieldStory = { | ||
name: "With suffix", | ||
args: { | ||
modelValue: "https://example.com", | ||
suffix: "suffix", | ||
}, | ||
}; | ||
|
||
export const VisualTestError: MtUrlFieldStory = { | ||
name: "Error", | ||
args: { | ||
modelValue: "https://example.com", | ||
error: { | ||
detail: "This is an error", | ||
}, | ||
}, | ||
}; | ||
|
||
export const VisualTestSmall: MtUrlFieldStory = { | ||
name: "Small", | ||
args: { | ||
modelValue: "https://example.com", | ||
size: "small", | ||
}, | ||
}; |
Oops, something went wrong.