Skip to content

Commit fbacd3d

Browse files
committed
fix: Updated screenshot name
1 parent 7ade331 commit fbacd3d

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

page-objects/service-spec-config-page.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export class ServiceSpecConfigPage extends BasePage {
4040
readonly alertDescription: Locator;
4141
private readonly specEditorHelper: SpecEditorPage;
4242

43-
4443
constructor(page: Page, testInfo: TestInfo, eyes: any, specName: string) {
4544
super(page, testInfo, eyes, specName);
4645
this.specTree = page.locator("#spec-tree");
@@ -157,15 +156,26 @@ export class ServiceSpecConfigPage extends BasePage {
157156

158157
// Phase 1: scroll .cm-scroller to bottom so CodeMirror renders all lines
159158
await this.specEditorHelper.loadFullEditorDocument(scroller);
160-
await scroller.evaluate((el) => { el.scrollTop = 0; });
159+
await scroller.evaluate((el) => {
160+
el.scrollTop = 0;
161+
});
161162
await this.page.waitForTimeout(200);
162163

163164
// Phase 2: try the CodeMirror API to jump directly to the term
164-
const foundByApi = await this.specEditorHelper.focusTermUsingCodeMirrorApi(content, searchText);
165+
const foundByApi =
166+
await this.specEditorHelper.focusTermUsingCodeMirrorApi(
167+
content,
168+
searchText,
169+
);
165170

166171
// Phase 3: if the API didn't work, manually scroll to find the line
167172
if (!foundByApi) {
168-
await this.specEditorHelper.scrollEditorToFindTerm(content, scroller, lines, searchText);
173+
await this.specEditorHelper.scrollEditorToFindTerm(
174+
content,
175+
scroller,
176+
lines,
177+
searchText,
178+
);
169179
}
170180

171181
const targetLine = lines.filter({ hasText: searchText }).first();
@@ -193,7 +203,6 @@ export class ServiceSpecConfigPage extends BasePage {
193203
});
194204
}
195205

196-
197206
async deleteSpecLinesInEditor(searchText: string, lineCount: number = 1) {
198207
await test.step(`Delete ${lineCount} spec line(s) starting with '${searchText}'`, async () => {
199208
const lines = this.specSection.locator(".cm-content .cm-line");
@@ -357,7 +366,11 @@ export class ServiceSpecConfigPage extends BasePage {
357366
async runBackwardCompatibilityTest() {
358367
await this.bccTestButton.click();
359368
await this.alertMessage.waitFor({ state: "visible", timeout: 5000 });
360-
await takeAndAttachScreenshot(this.page, "waiting for alert", this.eyes);
369+
await takeAndAttachScreenshot(
370+
this.page,
371+
"backward compatability passed",
372+
this.eyes,
373+
);
361374
}
362375

363376
async getAlertMessageText(): Promise<string> {

0 commit comments

Comments
 (0)