Version bump

Fix test issues
This commit is contained in:
jliddev
2020-12-14 14:32:47 -06:00
parent 3ce1ab064b
commit f63bcc0fdc
6 changed files with 44 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "wowup",
"productName": "WowUp",
"version": "2.1.0-beta.6",
"version": "2.1.0-beta.7",
"description": "Word of Warcraft addon updater",
"homepage": "https://wowup.io",
"author": {

View File

@@ -9,7 +9,7 @@ import { AlertDialogComponent } from "../alert-dialog/alert-dialog.component";
import { TranslateService } from "@ngx-translate/core";
import { roundDownloadCount, shortenDownloadCount } from "../../utils/number.utils";
import { DownloadCountPipe } from "../../pipes/download-count.pipe";
import { NO_SEARCH_RESULTS_ERROR } from "common/constants";
import { NO_SEARCH_RESULTS_ERROR } from "../../../common/constants";
@Component({
selector: "app-install-from-url-dialog",
@@ -120,7 +120,7 @@ export class InstallFromUrlDialogComponent implements OnInit, OnDestroy {
} else if (err.code && err.code === "EOPENBREAKER") {
// Provider circuit breaker is open
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.FAILED_TO_CONNECT");
} else if(message === NO_SEARCH_RESULTS_ERROR){
} else if (message === NO_SEARCH_RESULTS_ERROR) {
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.NO_SEARCH_RESULTS");
}

View File

@@ -10,7 +10,7 @@
<small class="text-2">{{ "PAGES.OPTIONS.DEBUG.LOG_FILES_DESCRIPTION" | translate }}</small>
</div>
<div>
<button mat-flat-button color="primary" (click)="onShowLogs()">
<button id="show-log-btn" mat-flat-button color="primary" (click)="onShowLogs()">
{{ "PAGES.OPTIONS.DEBUG.LOG_FILES_BUTTON" | translate }}
</button>
</div>
@@ -24,7 +24,8 @@
<small class="text-2">{{ "PAGES.OPTIONS.DEBUG.DEBUG_DATA_DESCRIPTION" | translate }}</small>
</div>
<div>
<button mat-flat-button color="primary" (click)="onLogDebugData()" [disabled]="dumpingDebugData === true">
<button id="dump-debug-btn" mat-flat-button color="primary" (click)="onLogDebugData()"
[disabled]="dumpingDebugData === true">
<span *ngIf="dumpingDebugData === false">{{ "PAGES.OPTIONS.DEBUG.DEBUG_DATA_BUTTON" | translate }}</span>
<div *ngIf="dumpingDebugData === true" [style.height]="'37px'" [style.width]="'100px'"
class="row align-items-center justify-content-center">

View File

@@ -21,24 +21,30 @@ describe("OptionsDebugSectionComponent", () => {
await TestBed.configureTestingModule({
declarations: [OptionsDebugSectionComponent],
imports: [HttpClientModule, TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: httpLoaderFactory,
deps: [HttpClient],
imports: [
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: httpLoaderFactory,
deps: [HttpClient],
},
compiler: {
provide: TranslateCompiler,
useClass: TranslateMessageFormatCompiler,
},
}),
],
})
.overrideComponent(OptionsDebugSectionComponent, {
set: {
providers: [
{ provide: AddonService, useValue: addonServiceSpy },
{ provide: WowUpService, useValue: wowUpServiceSpy },
],
},
compiler: {
provide: TranslateCompiler,
useClass: TranslateMessageFormatCompiler,
},
})],
}).overrideComponent(OptionsDebugSectionComponent, {
set: {
providers: [
{ provide: AddonService, useValue: addonServiceSpy },
{ provide: WowUpService, useValue: wowUpServiceSpy },
]},
}).compileComponents();
})
.compileComponents();
fixture = TestBed.createComponent(OptionsDebugSectionComponent);
component = fixture.componentInstance;
@@ -53,14 +59,14 @@ describe("OptionsDebugSectionComponent", () => {
});
it("Should call logDebugData", fakeAsync(() => {
const button = fixture.debugElement.nativeElement.querySelector("button[action='LogDebugData']");
const button = fixture.debugElement.nativeElement.querySelector("#dump-debug-btn");
button.click();
tick();
expect(addonServiceSpy.logDebugData).toHaveBeenCalled();
}));
it("Should call showLogFiles", fakeAsync(() => {
const button = fixture.debugElement.nativeElement.querySelector("button[action='ShowLogFiles']");
const button = fixture.debugElement.nativeElement.querySelector("#show-log-btn");
button.click();
tick();
expect(wowUpServiceSpy.showLogsFolder).toHaveBeenCalled();

View File

@@ -40,8 +40,7 @@ import { WarcraftService } from "../warcraft/warcraft.service";
import { WowUpService } from "../wowup/wowup.service";
import { AddonProviderFactory } from "./addon.provider.factory";
import { AddonFolder } from "../../models/wowup/addon-folder";
import { InstallError } from "../../errors";
import { WowUpAddonProvider } from "app/addon-providers/wowup-addon-provider";
import { WowUpAddonProvider } from "../../addon-providers/wowup-addon-provider";
export enum ScanUpdateType {
Start,

View File

@@ -1,5 +1,17 @@
{
"ChangeLogs": [
{
"Version": "2.1.0-beta.7",
"changes": [
"Use new icon for mac build (alphabitnz)",
"Some addon providers can no longer be turned off",
"Add better error handling for install/update errors",
"Add a new error description when importing from URL",
"Move debug option to the bottom of the list",
"Fix missing version number in About page",
"Improve the dump debug button to include new Hub provider"
]
},
{
"Version": "2.1.0-beta.6",
"changes": [