Skip to content

Commit 53f3f4e

Browse files
committed
fix: 🐛 mock selection bug
1 parent 9e57572 commit 53f3f4e

File tree

8 files changed

+1779
-1526
lines changed

8 files changed

+1779
-1526
lines changed

package.json

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,63 +51,63 @@
5151
"recording"
5252
],
5353
"devDependencies": {
54-
"@angular/animations": "15.0.3",
55-
"@angular/cdk": "15.0.2",
56-
"@angular/common": "15.0.3",
57-
"@angular/compiler": "15.0.3",
58-
"@angular/core": "15.0.3",
59-
"@angular/forms": "15.0.3",
60-
"@angular/material": "15.0.2",
61-
"@angular/platform-browser": "15.0.3",
62-
"@angular/platform-browser-dynamic": "15.0.3",
63-
"@angular/router": "15.0.3",
64-
"@angular-devkit/build-angular": "15.0.3",
65-
"@angular-eslint/builder": "15.1.0",
66-
"@angular-eslint/eslint-plugin": "15.1.0",
67-
"@angular-eslint/eslint-plugin-template": "15.1.0",
68-
"@angular-eslint/schematics": "15.1.0",
69-
"@angular-eslint/template-parser": "15.1.0",
70-
"@angular/cli": "15.0.3",
71-
"@angular/compiler-cli": "15.0.3",
72-
"@commitlint/cli": "17.3.0",
73-
"@commitlint/config-conventional": "17.3.0",
74-
"@ng-apimock/base-client": "3.3.0",
75-
"@ng-apimock/core": "3.6.0",
76-
"@ng-apimock/protractor-plugin": "2.1.0",
54+
"@angular/animations": "15.1.0",
55+
"@angular/cdk": "15.1.0",
56+
"@angular/common": "15.1.0",
57+
"@angular/compiler": "15.1.0",
58+
"@angular/core": "15.1.0",
59+
"@angular/forms": "15.1.0",
60+
"@angular/material": "15.1.0",
61+
"@angular/platform-browser": "15.1.0",
62+
"@angular/platform-browser-dynamic": "15.1.0",
63+
"@angular/router": "15.1.0",
64+
"@angular-devkit/build-angular": "15.1.1",
65+
"@angular-eslint/builder": "15.2.0",
66+
"@angular-eslint/eslint-plugin": "15.2.0",
67+
"@angular-eslint/eslint-plugin-template": "15.2.0",
68+
"@angular-eslint/schematics": "15.2.0",
69+
"@angular-eslint/template-parser": "15.2.0",
70+
"@angular/cli": "15.1.1",
71+
"@angular/compiler-cli": "15.1.0",
72+
"@commitlint/cli": "17.4.2",
73+
"@commitlint/config-conventional": "17.4.2",
74+
"@ng-apimock/base-client": "3.3.1",
75+
"@ng-apimock/core": "3.6.1",
76+
"@ng-apimock/protractor-plugin": "2.1.1",
7777
"@semantic-release/changelog": "6.0.2",
7878
"@semantic-release/commit-analyzer": "9.0.2",
7979
"@semantic-release/git": "10.0.1",
8080
"@semantic-release/github": "8.0.7",
81-
"@semantic-release/npm": "9.0.1",
81+
"@semantic-release/npm": "9.0.2",
8282
"@semantic-release/release-notes-generator": "10.0.3",
8383
"@types/chai": "4.3.4",
8484
"@types/cucumber": "6.0.1",
85-
"@types/jest": "29.2.4",
86-
"@types/node": "18.11.12",
87-
"@typescript-eslint/eslint-plugin": "5.46.0",
88-
"@typescript-eslint/parser": "5.46.0",
85+
"@types/jest": "29.2.5",
86+
"@types/node": "18.11.18",
87+
"@typescript-eslint/eslint-plugin": "5.48.1",
88+
"@typescript-eslint/parser": "5.48.1",
8989
"angular2-prettyjson": "3.0.1",
9090
"body-parser": "1.20.1",
9191
"chai": "4.3.7",
9292
"commitizen": "4.2.6",
9393
"cucumber": "6.0.5",
94-
"eslint": "8.29.0",
94+
"eslint": "8.32.0",
9595
"express": "4.18.2",
96-
"husky": "8.0.2",
96+
"husky": "8.0.3",
9797
"jest": "29.3.1",
9898
"jest-createspyobj": "2.0.0",
9999
"jest-preset-angular": "12.2.3",
100100
"lint-staged": "13.1.0",
101101
"p-iteration": "1.1.8",
102102
"protractor": "7.0.0",
103-
"protractor-cucumber-framework": "8.4.4",
104-
"rimraf": "3.0.2",
105-
"rxjs": "7.6.0",
106-
"semantic-release": "19.0.5",
103+
"protractor-cucumber-framework": "9.0.0",
104+
"rimraf": "4.0.6",
105+
"rxjs": "7.8.0",
106+
"semantic-release": "20.0.2",
107107
"tslib": "2.4.1",
108108
"ts-node": "10.9.1",
109109
"typescript": "4.9.4",
110-
"wait-on": "6.0.1",
110+
"wait-on": "7.0.1",
111111
"zone.js": "~0.12.0"
112112
},
113113
"lint-staged": {

src/app/mocks/overview/overview.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ <h2>Available mocks</h2>
3232
<mat-cell *matCellDef="let element">
3333
<mat-select name="{{element.name}}" [(ngModel)]="state[element.name].scenario"
3434
(selectionChange)="this.scenario$.next(element.name)">
35-
<mat-option *ngFor="let response of element.responses" [value]="response"
36-
[innerHtml]="response"></mat-option>
35+
<mat-option *ngFor="let response of element.responses" [value]="response">
36+
{{response}}</mat-option>
3737
<mat-option value="passThrough" class="">passThrough</mat-option>
3838
</mat-select>
3939
</mat-cell>

src/app/mocks/overview/overview.component.po.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class MocksOverviewPo {
3333
}
3434

3535
static row(index: number): MocksOverviewRowPo {
36-
return new MocksOverviewRowPo($(CONTAINER_SELECTOR).$$('.mat-row').get(index));
36+
return new MocksOverviewRowPo($(CONTAINER_SELECTOR).$$('.mat-mdc-row').get(index));
3737
}
3838

3939
static async selectScenario(name: string, scenario: string): Promise<void> {
@@ -42,7 +42,7 @@ export class MocksOverviewPo {
4242
}
4343

4444
static find(name: string): MocksOverviewRowPo {
45-
return new MocksOverviewRowPo($$('.mat-row')
45+
return new MocksOverviewRowPo($$('.mat-mdc-row')
4646
.filter(async el => {
4747
const text = await el.$('.mat-column-name').getText();
4848
return text === name;
@@ -71,7 +71,7 @@ export class MocksOverviewRowPo {
7171
}
7272

7373
get scenario(): any {
74-
return this.container.$('.mat-select-value-text').getText();
74+
return this.container.$('.mat-mdc-select-value-text').getText();
7575
}
7676

7777
async delayResponse(delay: string): Promise<void> {

src/app/presets/create-preset/create-preset-component.po.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export class CreatePresetPo {
66
await $('.name').sendKeys(name);
77

88
if (excludeMocks) {
9-
await $('.excludeMocks').$('.mat-checkbox-inner-container').click();
9+
await $('.excludeMocks').$('.mdc-checkbox__native-control').click();
1010
}
1111

1212
if (excludeVariables) {
13-
await $('.excludeVariables').$('.mat-checkbox-inner-container').click();
13+
await $('.excludeVariables').$('.mdc-checkbox__native-control').click();
1414
}
1515

1616
await element(by.buttonText('Create')).click();

src/app/presets/create-preset/create-preset.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.container {
77
display: flex;
88
flex-direction: column;
9+
padding: 20px;
910
}
1011

1112
.container > * {

src/app/presets/overview/overview.component.po.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export class PresetsOverviewPo {
2525
}
2626

2727
static row(index: number): PresetsOverviewRowPo {
28-
return new PresetsOverviewRowPo($(CONTAINER_SELECTOR).$$('.mat-row').get(index));
28+
return new PresetsOverviewRowPo($(CONTAINER_SELECTOR).$$('.mat-mdc-row').get(index));
2929
}
3030

3131
static find(name: string): PresetsOverviewRowPo {
32-
return new PresetsOverviewRowPo($$('.mat-row')
32+
return new PresetsOverviewRowPo($$('.mat-mdc-row')
3333
.filter(async el => {
3434
const text = await el.$('.mat-column-name').getText();
3535
return text === name;

src/app/variables/overview/overview.component.po.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export class VariablesOverviewPo {
2525
}
2626

2727
static row(index: number): VariablesOverviewRowPo {
28-
return new VariablesOverviewRowPo($(CONTAINER_SELECTOR).$$('.mat-row').get(index));
28+
return new VariablesOverviewRowPo($(CONTAINER_SELECTOR).$$('.mat-mdc-row').get(index));
2929
}
3030

3131
static find(name: string): VariablesOverviewRowPo {
32-
return new VariablesOverviewRowPo($$('.mat-row')
32+
return new VariablesOverviewRowPo($$('.mat-mdc-row')
3333
.filter(async el => {
3434
const text = await el.$('.mat-column-key').getText();
3535
return text === name;

0 commit comments

Comments
 (0)