-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
…to development
- Loading branch information
Showing
51 changed files
with
2,344 additions
and
842 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
56 changes: 56 additions & 0 deletions
56
apps/chat-e2e/src/assertions/promptPreviewModalAssertion.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { BaseAssertion } from '@/src/assertions/baseAssertion'; | ||
import { ElementState, ExpectedMessages } from '@/src/testData'; | ||
import { PromptPreviewModalWindow } from '@/src/ui/webElements/promptPreviewModalWindow'; | ||
|
||
export class PromptPreviewModalAssertion extends BaseAssertion { | ||
readonly promptPreviewModal: PromptPreviewModalWindow; | ||
|
||
constructor(promptPreviewModal: PromptPreviewModalWindow) { | ||
super(); | ||
this.promptPreviewModal = promptPreviewModal; | ||
} | ||
|
||
public async assertPromptPreviewModalState(expectedState: ElementState) { | ||
await super.assertElementState(this.promptPreviewModal, expectedState); // Use base class method | ||
} | ||
|
||
public async assertPromptPreviewModalTitle(expectedValue: string) { | ||
await super.assertElementText( | ||
this.promptPreviewModal.modalTitle, | ||
expectedValue, | ||
ExpectedMessages.modalDialogTitleIsValid, | ||
); // Use base class method | ||
} | ||
|
||
public async assertPromptName(expectedValue: string) { | ||
await super.assertElementText( | ||
this.promptPreviewModal.promptName, | ||
expectedValue, | ||
ExpectedMessages.promptNameValid, | ||
); // Use base class method | ||
} | ||
|
||
public async assertPromptDescription(expectedValue: string | undefined) { | ||
if (expectedValue === '' || expectedValue === undefined) { | ||
await super.assertElementState( | ||
this.promptPreviewModal.promptDescription, | ||
'hidden', | ||
ExpectedMessages.promptDescriptionValid, | ||
); | ||
} else { | ||
await super.assertElementText( | ||
this.promptPreviewModal.promptDescription, | ||
expectedValue, | ||
ExpectedMessages.promptDescriptionValid, | ||
); | ||
} | ||
} | ||
|
||
public async assertPromptContent(expectedValue: string) { | ||
await super.assertElementText( | ||
this.promptPreviewModal.promptContent, | ||
expectedValue, | ||
ExpectedMessages.promptContentValid, | ||
); | ||
} | ||
} |
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,4 @@ | ||
import { PublishEntityAssertion } from '@/src/assertions/publishEntityAssertion'; | ||
import { PromptsToApproveTree } from '@/src/ui/webElements/entityTree'; | ||
|
||
export class PromptToApproveAssertion extends PublishEntityAssertion<PromptsToApproveTree> {} |
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,4 @@ | ||
import { PublishEntityAssertion } from '@/src/assertions/publishEntityAssertion'; | ||
import { PromptsToPublishTree } from '@/src/ui/webElements/entityTree'; | ||
|
||
export class PromptToPublishAssertion extends PublishEntityAssertion<PromptsToPublishTree> {} |
13 changes: 13 additions & 0 deletions
13
apps/chat-e2e/src/assertions/publishedPromptPreviewModalAssertion.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { PromptPreviewModalAssertion } from '@/src/assertions/promptPreviewModalAssertion'; | ||
import { PublishedPromptPreviewModal } from '@/src/ui/webElements/publishedPromptPreviewModal'; | ||
|
||
export class PublishedPromptPreviewModalAssertion extends PromptPreviewModalAssertion { | ||
readonly publishedPromptPreviewModal: PublishedPromptPreviewModal; | ||
|
||
constructor(publishedPromptPreviewModal: PublishedPromptPreviewModal) { | ||
super(publishedPromptPreviewModal); | ||
this.publishedPromptPreviewModal = publishedPromptPreviewModal; | ||
} | ||
|
||
// Add assertions specific to PublishedPromptPreviewModal here | ||
} |
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
Oops, something went wrong.