Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-130834 / 24.10.0 / App version vs Version is confusing (by AlexKarpov98) #10805

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h3>{{ 'Application Info' | translate }}</h3>
@if (isLoading$() | async) {
<ngx-skeleton-loader></ngx-skeleton-loader>
} @else {
{{ app()?.latest_app_version | orNotAvailable }}
{{ app()?.latest_version | orNotAvailable }}
}
</div>
<div class="app-list-item sources">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('AppAvailableInfoCardComponent', () => {
});

it('shows card details', () => {
expect(spectator.queryAll('.app-list-item')[0]).toHaveText('Version: 2023.5.3');
expect(spectator.queryAll('.app-list-item')[0]).toHaveText('Version: 1.0.9');
expect(spectator.queryAll('.app-list-item')[1]).toHaveText('Source:github.com/home-assistant/home-assistant');
expect(spectator.queryAll('.app-list-item')[2]).toHaveText('Last App Update: 05/15/2023');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@
{{ app?.latest_app_version | orNotAvailable }}
}
</div>
<div class="app-list-item">
<span class="label">{{ 'Version' | translate }}:</span>
@if (isLoading$ | async) {
<ngx-skeleton-loader></ngx-skeleton-loader>
} @else {
{{ app?.latest_version | orNotAvailable }}
}
</div>
<div class="app-list-item">
<span class="label">{{ 'Keywords' | translate }}:</span>
@if (isLoading$ | async) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ describe('AppDetailsHeaderComponent', () => {
const application = {
icon_url: 'http://github.com/truenas/icon.png',
name: 'SETI@home',
latest_app_version: '1.0.0',
latest_app_version: '1.0.5',
latest_version: '1.0.0',
tags: ['aliens', 'ufo'],
train: 'stable',
home: 'https://www.seti.org',
Expand Down Expand Up @@ -153,19 +154,23 @@ describe('AppDetailsHeaderComponent', () => {

describe('other elements', () => {
it('shows app version', () => {
expect(spectator.queryAll('.app-list-item')[0]).toHaveText('App Version: 1.0.0');
expect(spectator.queryAll('.app-list-item')[0]).toHaveText('App Version: 1.0.5');
});

it('shows version', () => {
expect(spectator.queryAll('.app-list-item')[1]).toHaveText('Version: 1.0.0');
});

it('shows app keywords', () => {
expect(spectator.queryAll('.app-list-item')[1]).toHaveText('Keywords: aliens, ufo');
expect(spectator.queryAll('.app-list-item')[2]).toHaveText('Keywords: aliens, ufo');
});

it('shows app train', () => {
expect(spectator.queryAll('.app-list-item')[2]).toHaveText('Train: stable');
expect(spectator.queryAll('.app-list-item')[3]).toHaveText('Train: stable');
});

it('shows app homepage', () => {
expect(spectator.queryAll('.app-list-item')[3]).toHaveText('Homepage:seti.org');
expect(spectator.queryAll('.app-list-item')[4]).toHaveText('Homepage:seti.org');
});

it('shows app description', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ <h3 mat-card-title>
}
</div>
</div>
<div class="details-item">
<div class="label">{{ 'Version' | translate }}:</div>
<div class="value">
@if (!isCustomApp()) {
{{ app()?.version | orNotAvailable }}
}
</div>
</div>
<div class="details-item sources">
<div class="label">{{ 'Source' | translate }}:</div>
<div class="value">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
name: 'test-user-app-name',
human_version: '1.2.3_3.2.1',
upgrade_available: true,
version: '1.2.3',
metadata: {
name: 'ix-test-app',
icon: '',
sources: [
'http://github.com/ix-test-app/ix-test-app/',
],
version: '1.2.3',
app_version: '3.2.1',
train: 'stable',
},
Expand Down Expand Up @@ -135,6 +135,10 @@
label: 'App Version:',
value: '3.2.1',
},
{
label: 'Version:',
value: '1.2.3',
},
{
label: 'Source:',
value: 'github.com/ix-test-app/ix-test-app',
Expand Down Expand Up @@ -209,7 +213,7 @@

// TODO:
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
it.skip('opens rollback app dialog when Roll Back button is pressed', async () => {

Check warning on line 216 in src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.spec.ts

View workflow job for this annotation

GitHub Actions / Validate code style

Disabled test
const rollbackButton = await loader.getHarness(MatButtonHarness.with({ text: 'Roll Back' }));
await rollbackButton.click();

Expand Down
Loading