Skip to content

Commit

Permalink
Merge pull request #1842 from DSD-DBS/wait-to-capture-screenshot
Browse files Browse the repository at this point in the history
test: Add delay to let mat-error animation complete
  • Loading branch information
MoritzWeber0 authored Sep 25, 2024
2 parents b3b658b + 5907403 commit ab7e1cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export default meta;
type Story = StoryObj<ManageGitModelComponent>;

export const InvalidURL: Story = {
args: {},
parameters: {
screenshot: {
delay: 300,
},
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const absoluteURL = canvas.getByTestId('absolute-url');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ <h2 class="mb-2 text-xl font-medium">Link a Git Server Instance</h2>
@if (gitInstancesForm.controls.type.value !== "General") {
<mat-form-field class="form-field-default" appearance="fill">
<mat-label>API Base URL</mat-label>
<input matInput formControlName="api_url" data-testid="api_url" />
<input
matInput
spellcheck="false"
formControlName="api_url"
data-testid="api_url"
/>
@if (gitInstancesForm.controls.url.errors?.urlSchemeError) {
<mat-error> API URLs have to start with 'http(s)://' </mat-error>
}
Expand Down

0 comments on commit ab7e1cc

Please sign in to comment.