-
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 github.com:epam/ai-dial-chat into e2e/e…
…rrors_on_stop_button_tests # Conflicts: # e2e/src/testData/expectedMessages.ts # e2e/src/tests/chatBarFolderConversation.test.ts # e2e/src/tests/workWithModels.test.ts # e2e/src/ui/webElements/dropdownMenu.ts # e2e/src/ui/webElements/folders.ts
- Loading branch information
Showing
86 changed files
with
2,392 additions
and
525 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { BasePage } from './basePage'; | ||
|
||
import { Auth0 } from '@/e2e/src/ui/webElements/auth0'; | ||
|
||
export class Auth0Page extends BasePage { | ||
private auth0!: Auth0; | ||
|
||
getAuth0(): Auth0 { | ||
if (!this.auth0) { | ||
this.auth0 = new Auth0(this.page); | ||
} | ||
return this.auth0; | ||
} | ||
|
||
async loginToChatBot() { | ||
await this.page.waitForLoadState('networkidle'); | ||
await this.page.waitForLoadState('domcontentloaded'); | ||
const auth0Form = this.getAuth0(); | ||
await auth0Form.setCredentials( | ||
process.env.E2E_USERNAME!, | ||
process.env.E2E_PASSWORD!, | ||
); | ||
return this.waitFoApiResponsesReceived( | ||
() => auth0Form.loginButton.click(), | ||
{ | ||
setEntitiesEnvVars: true, | ||
}, | ||
); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
export const LoginSelectors = { | ||
token: '#input-access_token-for-credentials-provider', | ||
signIn: '[type=submit]', | ||
auth0Container: '.auth0-lock-widget-container', | ||
username: '[name="email"]', | ||
password: '[name="password"]', | ||
login: '[name="submit"]', | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { LoginSelectors } from '@/e2e/src/ui/selectors'; | ||
import { BaseElement } from '@/e2e/src/ui/webElements/baseElement'; | ||
import { Page } from '@playwright/test'; | ||
|
||
export class Auth0 extends BaseElement { | ||
constructor(page: Page) { | ||
super(page, LoginSelectors.auth0Container); | ||
} | ||
|
||
public usernameInput = this.getChildElementBySelector( | ||
LoginSelectors.username, | ||
); | ||
public passwordInput = this.getChildElementBySelector( | ||
LoginSelectors.password, | ||
); | ||
public loginButton = this.getChildElementBySelector(LoginSelectors.login); | ||
|
||
public async setCredentials(username: string, password: string) { | ||
await this.usernameInput.fillInInput(username); | ||
await this.passwordInput.fillInInput(password); | ||
} | ||
} |
Oops, something went wrong.