Skip to content

Commit 6671a43

Browse files
authored
Merge branch 'development' into patch-3
2 parents 18cbb43 + bdac5d0 commit 6671a43

File tree

450 files changed

+17990
-16832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

450 files changed

+17990
-16832
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
"semi": "off",
3434
"@typescript-eslint/semi": ["error"],
3535
"@typescript-eslint/no-extra-semi": "error",
36-
"no-extra-semi": "off"
36+
"no-extra-semi": "off",
37+
"@angular-eslint/prefer-standalone": [
38+
"off"
39+
]
3740
}
3841
},
3942
{

.github/workflows/on-push-or-pull.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env:
2626
jobs:
2727
# one run
2828
one_run:
29-
runs-on: ubuntu-latest
29+
runs-on: ubuntu-22.04
3030
steps:
3131
- name: Cancel Previous Runs
3232
uses: styfle/[email protected]
@@ -35,7 +35,7 @@ jobs:
3535

3636
# install dependencies
3737
install:
38-
runs-on: ubuntu-latest
38+
runs-on: ubuntu-22.04
3939
needs: one_run
4040
steps:
4141
- uses: actions/checkout@v3
@@ -50,7 +50,7 @@ jobs:
5050
# build ngx-bootstrap
5151
build:
5252
needs: install
53-
runs-on: ubuntu-latest
53+
runs-on: ubuntu-22.04
5454
steps:
5555
- uses: actions/checkout@v3
5656
- uses: actions/cache@v3
@@ -61,14 +61,17 @@ jobs:
6161
with:
6262
path: ${{ env.CACHE_DIST_PATH }}
6363
key: dist-${{ github.run_id }}
64+
# - run: |
65+
# npx nx build ngx-bootstrap --runner=cloud --configuration=production
66+
# npx nx build --runner=cloud --configuration=production
6467
- run: |
65-
npx nx build ngx-bootstrap --runner=cloud --configuration=production
66-
npx nx build --runner=cloud --configuration=production
68+
npx nx build ngx-bootstrap --configuration=production
69+
npx nx prerender --configuration=production
6770
6871
6972
# run unit tests
7073
unit_tests_with_coverage:
71-
runs-on: ubuntu-latest
74+
runs-on: ubuntu-22.04
7275
needs: build
7376
steps:
7477
- uses: actions/checkout@v3
@@ -80,25 +83,27 @@ jobs:
8083
with:
8184
path: ${{ env.CACHE_DIST_PATH }}
8285
key: dist-${{ github.run_id }}
83-
- run: npm test -- --runner=cloud --codeCoverage
86+
# - run: npm test -- --runner=cloud --codeCoverage
87+
- run: npm test -- --codeCoverage
8488
- run: npx codecov ./coverage/
8589
continue-on-error: true
8690

8791
# run linting
8892
linting:
89-
runs-on: ubuntu-latest
93+
runs-on: ubuntu-22.04
9094
needs: install
9195
steps:
9296
- uses: actions/checkout@v3
9397
- uses: actions/cache@v3
9498
with:
9599
path: ${{ env.CACHE_NODE_MODULES_PATH }}
96100
key: node_modules-${{ hashFiles('**/package-lock.json') }}
97-
- run: npm run lint -- --runner=cloud
101+
# - run: npm run lint -- --runner=cloud
102+
- run: npm run lint --
98103

99104
# firebase deploy preview
100105
firebase_preview:
101-
runs-on: ubuntu-latest
106+
runs-on: ubuntu-22.04
102107
needs: build
103108
outputs:
104109
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
@@ -121,7 +126,7 @@ jobs:
121126
# run playwright
122127
e2e_smoke:
123128
name: e2e smoke (${{ matrix.shard }}/${{ strategy.job-total }})
124-
runs-on: ubuntu-latest
129+
runs-on: ubuntu-22.04
125130
needs: [install, build, firebase_preview]
126131

127132
strategy:
@@ -146,13 +151,13 @@ jobs:
146151
147152
- name: smoke e2e on firebase
148153
if: ${{ needs.firebase_preview.outputs.output_url }}
149-
run: PLAYWRIGHT_TEST_BASE_URL="${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/" npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-integration --skipServe --shard=${{ matrix.shard }}/${{ strategy.job-total }}
154+
run: PLAYWRIGHT_TEST_BASE_URL="${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/" npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-integration --skipServe --shard=${{ matrix.shard }}/${{ strategy.job-total }}
150155

151156
- name: smoke e2e local
152157
if: ${{ !needs.firebase_preview.outputs.output_url }}
153158
run: npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-integration --shard=${{ matrix.shard }}/${{ strategy.job-total }}
154159

155-
- uses: actions/upload-artifact@v3
160+
- uses: actions/upload-artifact@v4
156161
if: always()
157162
with:
158163
name: playwright-report-smoke-${{ matrix.shard }}_${{ strategy.job-total }}
@@ -161,7 +166,7 @@ jobs:
161166

162167
e2e_full:
163168
name: e2e full
164-
runs-on: ubuntu-latest
169+
runs-on: ubuntu-22.04
165170
needs: [e2e_smoke]
166171

167172
strategy:
@@ -194,7 +199,7 @@ jobs:
194199
continue-on-error: true
195200
run: npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-full --shard=${{ matrix.shard }}/${{ strategy.job-total }}
196201

197-
- uses: actions/upload-artifact@v3
202+
- uses: actions/upload-artifact@v4
198203
if: always()
199204
with:
200205
name: playwright-report-full-${{ matrix.shard }}_${{ strategy.job-total }}

.github/workflows/on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
key: dist-${{ github.run_id }}
5353
- run: |
5454
npx nx build ngx-bootstrap --runner=cloud --configuration=production
55-
npx ng build --runner=cloud --configuration=production
55+
npx nx prerender --runner=cloud --configuration=production
5656
5757
# update release notes in github
5858
# update_release_draft:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Thumbs.db
4242

4343
firebase-debug.log
4444
.nx-cache
45+
.nx
4546
scully.log
4647
/.angular
4748
/.scully
@@ -59,4 +60,4 @@ scully.log
5960

6061
migration.json
6162

62-
.nx/cache
63+
.nx/cache

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ The only two dependencies are [Angular](https://angular.io) and [Bootstrap](http
178178
Here is the version compatibility list:
179179

180180
| ngx-bootstrap | Angular | Bootstrap CSS |
181-
|---------------| --------------- | ----------------------- |
181+
|---------------|-----------------| ----------------------- |
182+
| 19.x.x | 19.x.x | 5.x.x or 4.x.x |
182183
| 18.x.x | 18.x.x | 5.x.x or 4.x.x |
183184
| 12.x.x | 17.x.x | 5.x.x or 4.x.x |
184185
| 11.x.x | 16.x.x | 5.x.x or 4.x.x |

apps/ngx-bootstrap-docs-e2e/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default defineConfig({
55
testMatch: '**/*.spec.ts',
66
fullyParallel: true,
77
workers: 3,
8+
89
reporter: [['html', { outputFolder: 'playwright-report', open: 'never' }]],
910
use: {
1011
baseURL: process.env['PLAYWRIGHT_TEST_BASE_URL'] || 'http://localhost:4200/ngx-bootstrap/',

apps/ngx-bootstrap-docs-e2e/project.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
"sourceRoot": "apps/ngx-bootstrap-docs-e2e/src",
55
"projectType": "application",
66
"tags": [],
7-
"implicitDependencies": ["ngx-bootstrap-docs"],
7+
"implicitDependencies": [
8+
"ngx-bootstrap-docs"
9+
],
810
"targets": {
911
"e2e": {
1012
"executor": "@nxkit/playwright:test",
11-
"outputs": ["{options.outputPath}"],
13+
"outputs": [
14+
"{options.outputPath}"
15+
],
1216
"options": {
1317
"outputPath": "dist/apps/ngx-bootstrap-docs-e2e/test-results",
1418
"playwrightConfig": "apps/ngx-bootstrap-docs-e2e/playwright.config.ts",
@@ -24,8 +28,10 @@
2428
}
2529
},
2630
"debug": {
27-
"builder": "@nxkit/playwright:test",
28-
"outputs": ["{options.outputPath}"],
31+
"executor": "@nxkit/playwright:test",
32+
"outputs": [
33+
"{options.outputPath}"
34+
],
2935
"options": {
3036
"outputPath": "dist/apps/ngx-bootstrap-docs-e2e/test-results",
3137
"playwrightConfig": "apps/ngx-bootstrap-docs-e2e/playwright.config.ts",
@@ -39,14 +45,16 @@
3945
}
4046
},
4147
"show-report": {
42-
"builder": "@nxkit/playwright:show-report",
48+
"executor": "@nxkit/playwright:show-report",
4349
"options": {
4450
"reportPath": "dist/apps/ngx-bootstrap-docs-e2e/playwright-report"
4551
}
4652
},
4753
"lint": {
4854
"executor": "@nx/eslint:lint",
49-
"outputs": ["{options.outputPath}"]
55+
"outputs": [
56+
"{options.outputPath}"
57+
]
5058
}
5159
}
52-
}
60+
}

apps/ngx-bootstrap-docs-e2e/src/support/accordion.po.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect, ConsoleMessage } from '@playwright/test';
22
import { BasePo } from './base.po';
33

44
export class AccordionPo extends BasePo {
5-
override pageUrl = '#/components/accordion';
5+
override pageUrl = '/ngx-bootstrap/components/accordion';
66
pageTitle = 'Accordion';
77
ghLinkToComponent = 'https://github.com/valor-software/ngx-bootstrap/tree/development/src/accordion';
88
additionalHtml = '.badge';
@@ -38,10 +38,12 @@ export class AccordionPo extends BasePo {
3838
}
3939

4040
async clickOnAccordionGroup(baseSelector: string, itemIndex: number) {
41-
await this.page
41+
const accordionButton = this.page
4242
.locator(baseSelector + ' accordion-group button')
43-
.nth(itemIndex)
44-
.click();
43+
.nth(itemIndex);
44+
45+
await accordionButton.waitFor({ state: 'visible', timeout: 10000 });
46+
await accordionButton.click();
4547
}
4648

4749
async expectItemContentVisible(baseSelector: string, itemIndex: number, visible: boolean) {

apps/ngx-bootstrap-docs-e2e/src/support/alerts.po.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect } from '@playwright/test';
22
import { BasePo } from './base.po';
33

44
export class AlertsPo extends BasePo {
5-
override pageUrl = '#/components/alerts';
5+
override pageUrl = '/ngx-bootstrap/components/alerts';
66
pageTitle = 'Alerts';
77
ghLinkToComponent = 'https://github.com/valor-software/ngx-bootstrap/tree/development/src/alert';
88

@@ -31,10 +31,10 @@ export class AlertsPo extends BasePo {
3131
local: '.alert-md-local',
3232
};
3333

34-
async expectAlertVisible(baseSelector: string, alertType: string, visible = true, timeout = 5000) {
35-
await expect(await this.page
36-
.locator(baseSelector + ` ${this.alertType[alertType]}`)
37-
).toBeVisible({ timeout: timeout, visible: visible });
34+
async expectAlertVisible(baseSelector: string, alertType: string, visible = true, timeout = 10000) {
35+
const alertElement = this.page.locator(baseSelector + ` ${this.alertType[alertType]}`);
36+
await alertElement.waitFor({ state: visible ? 'visible' : 'hidden', timeout: timeout });
37+
await expect(alertElement).toBeVisible({ visible: visible });
3838
}
3939

4040
async expectBtnNotExist(baseSelector: string, buttonName: string) {

apps/ngx-bootstrap-docs-e2e/src/support/base.po.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ export class BasePo {
1616
async navigateTo() {
1717
const bsVersionRoute = process.env['bsVersion'] ? `?_bsVersion=bs${process.env['bsVersion']}` : '';
1818
await this.page.goto(this.pageUrl + bsVersionRoute);
19+
await this.page.waitForLoadState('domcontentloaded');
20+
// Ensure Overview tab is active by clicking on it
21+
const overviewTab = this.page.locator('a[aria-selected="false"]').getByText('Overview');
22+
if (await overviewTab.isVisible()) {
23+
await overviewTab.click();
24+
await this.page.waitForTimeout(1000); // Wait for tab content to load
25+
}
1926
}
2027

2128
async scrollToMenu(menuTxt: string) {

0 commit comments

Comments
 (0)