AAE-32905 Rework pr pipeline (#11853)

* [AAE-32905] - Improve ADF workflow

* [ci:force]

* [AAE-32905] - Improve cache use

* [AAE-32905] - Improve cache use

* [AAE-32905] - Improved workflows

* [AAE-32905] - Checking cache

* [AAE-32905] - Checking cache

* [AAE-32905] - Fix cli

* [AAE-32905] - Fix cache

* [AAE-32905] - Fix cache

* [AAE-32905] - Fix cache

* [AAE-32905] - improving workflow and adding some storybook tests

* [AAE-32905] - improving workflow and adding some storybook tests

* [AAE-32905] - Added more improvements

* [AAE-32905] - Added more improvements

* [AAE-32905] - bugfix

* [AAE-32905] - Added missing part to the cache

* [AAE-32905] - bugfix

* [AAE-32905] - fixed cache poisoning

* [AAE-32905] - timing jobs

* [AAE-32905] - chosen to build all together as it's more efficient

* [AAE-32905] - Fixed script injection issue
This commit is contained in:
Vito Albano
2026-05-05 13:16:36 +01:00
committed by GitHub
parent 3fc59b2358
commit 3a543d8a0a
15 changed files with 567 additions and 212 deletions
@@ -19,6 +19,7 @@ import { Meta, StoryObj } from '@storybook/angular';
import { CardViewBoolItemComponent } from './card-view-boolitem.component';
import { CardViewBoolItemModel } from '../../public-api';
import { cardViewSharedMeta } from '../../stories/card-view-shared-meta';
import { expect, within } from 'storybook/test';
const meta: Meta<CardViewBoolItemComponent> = {
...cardViewSharedMeta,
@@ -50,5 +51,15 @@ export const CardViewBoolItem: Story = {
default: false,
editable: true
})
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const label = canvas.getByText(/Agree to all terms and conditions/i);
await expect(label).toBeVisible();
const toggle = canvas.getByRole('checkbox');
await expect(toggle).toBeVisible();
await expect(toggle).toBeChecked();
}
};
@@ -19,6 +19,7 @@ import { Meta, StoryObj } from '@storybook/angular';
import { CardViewTextItemComponent } from './card-view-textitem.component';
import { CardViewTextItemModel } from '../../public-api';
import { cardViewSharedMeta } from '../../stories/card-view-shared-meta';
import { expect, within } from 'storybook/test';
const meta: Meta<CardViewTextItemComponent> = {
...cardViewSharedMeta,
@@ -50,6 +51,15 @@ export const ClickableCardViewTextItem: Story = {
clickable: true,
icon: 'close'
})
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const label = canvas.getByText(/CardView Text Item - Clickable template/i);
await expect(label).toBeVisible();
const value = canvas.getByText(/click here/i);
await expect(value).toBeVisible();
}
};
@@ -104,5 +114,14 @@ export const DefaultCardViewTextItem: Story = {
icon: 'close',
multiline: false
})
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const label = canvas.getByText(/CardView Text Item - Default template/i);
await expect(label).toBeVisible();
const value = canvas.getByText(/input here/i);
await expect(value).toBeVisible();
}
};
@@ -21,6 +21,7 @@ import { ADF_COMMENTS_SERVICE } from './interfaces/comments.token';
import { commentsStoriesData } from './mocks/comments.stories.mock';
import { CommentsServiceStoriesMock } from './mocks/comments.service.stories.mock';
import { provideStoryCore } from '../stories/core-story.providers';
import { expect, within } from 'storybook/test';
const meta: Meta<CommentsComponent> = {
component: CommentsComponent,
@@ -92,6 +93,12 @@ export const SingleCommentWithAvatar: Story = {
args: {
comments: [commentsStoriesData[0]],
readOnly: true
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const commentText = canvas.getByText(/I've done this task, what's next\?/i);
await expect(commentText).toBeVisible();
}
};
@@ -112,11 +119,23 @@ export const NoComments: Story = {
args: {
comments: [],
readOnly: true
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const commentElements = canvas.queryAllByText(/I've done this task/i);
await expect(commentElements.length).toBe(0);
}
};
export const Comments: Story = {
render: (args) => ({
props: args
})
}),
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const commentInput = canvas.getByRole('textbox');
await expect(commentInput).toBeVisible();
}
};
@@ -18,6 +18,7 @@
import { applicationConfig, Meta, StoryObj, moduleMetadata } from '@storybook/angular';
import { PaginationComponent } from './pagination.component';
import { provideStoryCore } from '../stories/core-story.providers';
import { expect, within } from 'storybook/test';
const meta: Meta<PaginationComponent> = {
component: PaginationComponent,
@@ -95,5 +96,20 @@ type Story = StoryObj<PaginationComponent>;
export const Pagination: Story = {
render: (args) => ({
props: args
})
}),
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const paginationRange = canvas.getByText(/1-25 of 100/i);
await expect(paginationRange).toBeVisible();
const pageSizeSelector = canvas.getByRole('combobox');
await expect(pageSizeSelector).toBeVisible();
const nextButton = canvas.getByRole('button', { name: /next/i });
await expect(nextButton).toBeVisible();
const previousButton = canvas.getByRole('button', { name: /previous/i });
await expect(previousButton).toBeVisible();
}
};
@@ -20,6 +20,7 @@ import { ToolbarComponent } from './toolbar.component';
import { ToolbarDividerComponent } from './toolbar-divider.component';
import { ToolbarTitleComponent } from './toolbar-title.component';
import { provideStoryCore } from '../stories/core-story.providers';
import { expect, within } from 'storybook/test';
type ToolbarStoryArgs = ToolbarComponent & {
toolbarTitle?: boolean;
@@ -118,5 +119,11 @@ export const Toolbar: Story = {
</ng-container>
<ng-container *ngIf="${args.toolbarDivider}">left<adf-toolbar-divider></adf-toolbar-divider>right</ng-container>
</adf-toolbar>`
})
}),
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const toolbar = canvas.getByRole('toolbar');
await expect(toolbar).toBeVisible();
}
};