-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
133 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
page-objects/node/nodeDetailPage.ts → page-objects/views/node/nodeDetailPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Page } from '@playwright/test'; | ||
|
||
export class ProjectFormPage { | ||
private page: Page; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
} | ||
|
||
// Locators | ||
private nameInput = '[data-test="name"] input'; | ||
private descriptionTextarea = '[data-test="description"] textarea'; | ||
|
||
async fillProjectForm(name: string, description: string) { | ||
await this.setName(name); | ||
await this.setDescription(description); | ||
} | ||
|
||
async setName(name: string) { | ||
await this.page.fill(this.nameInput, name); | ||
} | ||
|
||
async setDescription(description: string) { | ||
await this.page.fill(this.descriptionTextarea, description); | ||
} | ||
|
||
async getName(): Promise<string> { | ||
return await this.page.inputValue(this.nameInput); | ||
} | ||
|
||
async getDescription(): Promise<string> { | ||
return await this.page.inputValue(this.descriptionTextarea); | ||
} | ||
|
||
async isNameInputDisabled(): Promise<boolean> { | ||
const nameInput = this.page.locator(this.nameInput); | ||
return await nameInput.isDisabled(); | ||
} | ||
|
||
async isDescriptionInputDisabled(): Promise<boolean> { | ||
const descriptionTextarea = this.page.locator(this.descriptionTextarea); | ||
return await descriptionTextarea.isDisabled(); | ||
} | ||
|
||
async getNamePlaceholder(): Promise<string | null> { | ||
const nameInput = this.page.locator(this.nameInput); | ||
return await nameInput.getAttribute('placeholder'); | ||
} | ||
|
||
async getDescriptionPlaceholder(): Promise<string | null> { | ||
const descriptionTextarea = this.page.locator(this.descriptionTextarea); | ||
return await descriptionTextarea.getAttribute('placeholder'); | ||
} | ||
} | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters