Skip to content

Commit

Permalink
workflows update
Browse files Browse the repository at this point in the history
  • Loading branch information
chalapkoStanislav committed Jul 15, 2024
1 parent f21755a commit 1727821
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/playwright_pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
GMAIL_NAME: ${{ secrets.GMAIL_NAME }}
run: npx playwright test --project=firefox -gv 'PERF' ./tests/signup.spec.js
run: npx playwright test --project=firefox -gv 'PERF'
- name: Upload Playwright Report
uses: actions/upload-artifact@v3
if: always()
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
GMAIL_NAME: ${{ secrets.GMAIL_NAME }}
run: npx playwright test --project=webkit -gv 'PERF' ./tests/signup.spec.js
run: npx playwright test --project=webkit -gv 'PERF'
- name: Upload Playwright Report
uses: actions/upload-artifact@v3
if: always()
Expand Down
182 changes: 91 additions & 91 deletions tests/signup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,97 +36,97 @@ test(qase(33,'ON-6 Sign up with no password'), async ({ page }) => {
await registerPage.isCreateAccountBtnDisabled();
});

// test(qase(34,'ON-7 Sign up with incorrect password'), async ({ page }) => {
// const loginPage = new LoginPage(page);
// const registerPage = new RegisterPage(page);
// await loginPage.goto();
// await loginPage.clickOnCreateAccount();
// await registerPage.isRegisterPageOpened();
// await registerPage.enterEmail(process.env.LOGIN_EMAIL);
// await registerPage.enterPassword('1234');
// await registerPage.isPasswordInputErrorDisplayed(
// 'Password should at least be 8 characters',
// );
// await registerPage.isCreateAccountBtnDisplayed();
// await registerPage.isCreateAccountBtnDisabled();
// });
//
// test.describe(() => {
// let randomName,email,invite;
// test.beforeEach(async ({ page }, testInfo) => {
// await testInfo.setTimeout(testInfo.timeout + 30000);
// randomName = random().concat('autotest');
// email = `${process.env.GMAIL_NAME}+${randomName}@gmail.com`;
// const loginPage = new LoginPage(page);
// const registerPage = new RegisterPage(page);
// await loginPage.goto();
// await loginPage.acceptCookie();
// await loginPage.clickOnCreateAccount();
// await registerPage.isRegisterPageOpened();
// await registerPage.enterEmail(email);
// await registerPage.enterPassword(process.env.LOGIN_PWD);
// await registerPage.clickOnCreateAccountBtn();
//
// await registerPage.enterFullName(randomName);
// await registerPage.clickOnAcceptTermsCheckbox();
// await registerPage.clickOnCreateAccountSecondBtn();
// await registerPage.isRegisterEmailCorrect(email);
// invite = await waitMessage(page, email, 40);
// });
//
// test(qase(28,'ON-1 Sign up with an email address'), async ({ page }) => {
// const dashboardPage = new DashboardPage(page);
// await checkRegisterText(invite.inviteText, randomName);
// await page.goto(invite.inviteUrl);
// await dashboardPage.fillOnboardingFirstQuestions();
// });
//
// test(qase([43,44],'ON-16,17 Onboarding questions flow'), async ({ page }) => {
// const dashboardPage = new DashboardPage(page);
// const teamPage = new TeamPage(page);
// await page.goto(invite.inviteUrl);
// await dashboardPage.fillOnboardingFirstQuestions();
// await dashboardPage.isOnboardingNewsHeaderDisplayed();
// await dashboardPage.isOnboardingNewsUpdatesCheckboxDisplayed();
// await dashboardPage.isOnboardingNewsCheckboxDisplayed();
// await dashboardPage.clickOnOnboardingContinueBtn();
// await dashboardPage.enterOnboardingTeamName(randomName);
// await dashboardPage.clickOnOnboardingContinueCreateTeamButton();
// const rand1 = random().concat('autotest');
// const firstEmail = `${process.env.GMAIL_NAME}+${rand1}@gmail.com`;
// const rand2 = random().concat('autotest');
// const secondEmail = `${process.env.GMAIL_NAME}+${rand2}@gmail.com`;
// const emails = `${firstEmail}, ${secondEmail}`;
// await dashboardPage.enterOnboardingInviteEmails(emails);
// await dashboardPage.clickOnOnboardingCreateTeamButton();
// await teamPage.isTeamSelected(randomName);
// });
// });
//
// test(qase(36,'ON-9 Create demo account'), async ({ page }) => {
// const loginPage = new LoginPage(page);
// const registerPage = new RegisterPage(page);
// const dashboardPage = new DashboardPage(page);
// await loginPage.goto();
// await loginPage.acceptCookie();
// await loginPage.clickOnCreateAccount();
// await registerPage.isRegisterPageOpened();
// await registerPage.clickOnCreateDemoAccountBtn();
// await dashboardPage.fillOnboardingQuestions();
// await dashboardPage.isHeaderDisplayed('Projects');
// });
//
// test(qase(54,'ON-27 Sign up with email of existing user'), async ({ page }) => {
// const loginPage = new LoginPage(page);
// const registerPage = new RegisterPage(page);
// await loginPage.goto();
// await loginPage.clickOnCreateAccount();
// await registerPage.isRegisterPageOpened();
// await registerPage.enterEmail(process.env.LOGIN_EMAIL);
// await registerPage.enterPassword(process.env.LOGIN_PWD);
// await registerPage.clickOnCreateAccountBtn();
// await registerPage.isFullNameFieldDisplayed();
// });
test(qase(34,'ON-7 Sign up with incorrect password'), async ({ page }) => {
const loginPage = new LoginPage(page);
const registerPage = new RegisterPage(page);
await loginPage.goto();
await loginPage.clickOnCreateAccount();
await registerPage.isRegisterPageOpened();
await registerPage.enterEmail(process.env.LOGIN_EMAIL);
await registerPage.enterPassword('1234');
await registerPage.isPasswordInputErrorDisplayed(
'Password should at least be 8 characters',
);
await registerPage.isCreateAccountBtnDisplayed();
await registerPage.isCreateAccountBtnDisabled();
});

test.describe(() => {
let randomName,email,invite;
test.beforeEach(async ({ page }, testInfo) => {
await testInfo.setTimeout(testInfo.timeout + 30000);
randomName = random().concat('autotest');
email = `${process.env.GMAIL_NAME}+${randomName}@gmail.com`;
const loginPage = new LoginPage(page);
const registerPage = new RegisterPage(page);
await loginPage.goto();
await loginPage.acceptCookie();
await loginPage.clickOnCreateAccount();
await registerPage.isRegisterPageOpened();
await registerPage.enterEmail(email);
await registerPage.enterPassword(process.env.LOGIN_PWD);
await registerPage.clickOnCreateAccountBtn();

await registerPage.enterFullName(randomName);
await registerPage.clickOnAcceptTermsCheckbox();
await registerPage.clickOnCreateAccountSecondBtn();
await registerPage.isRegisterEmailCorrect(email);
invite = await waitMessage(page, email, 40);
});

test(qase(28,'ON-1 Sign up with an email address'), async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await checkRegisterText(invite.inviteText, randomName);
await page.goto(invite.inviteUrl);
await dashboardPage.fillOnboardingFirstQuestions();
});

test(qase([43,44],'ON-16,17 Onboarding questions flow'), async ({ page }) => {
const dashboardPage = new DashboardPage(page);
const teamPage = new TeamPage(page);
await page.goto(invite.inviteUrl);
await dashboardPage.fillOnboardingFirstQuestions();
await dashboardPage.isOnboardingNewsHeaderDisplayed();
await dashboardPage.isOnboardingNewsUpdatesCheckboxDisplayed();
await dashboardPage.isOnboardingNewsCheckboxDisplayed();
await dashboardPage.clickOnOnboardingContinueBtn();
await dashboardPage.enterOnboardingTeamName(randomName);
await dashboardPage.clickOnOnboardingContinueCreateTeamButton();
const rand1 = random().concat('autotest');
const firstEmail = `${process.env.GMAIL_NAME}+${rand1}@gmail.com`;
const rand2 = random().concat('autotest');
const secondEmail = `${process.env.GMAIL_NAME}+${rand2}@gmail.com`;
const emails = `${firstEmail}, ${secondEmail}`;
await dashboardPage.enterOnboardingInviteEmails(emails);
await dashboardPage.clickOnOnboardingCreateTeamButton();
await teamPage.isTeamSelected(randomName);
});
});

test(qase(36,'ON-9 Create demo account'), async ({ page }) => {
const loginPage = new LoginPage(page);
const registerPage = new RegisterPage(page);
const dashboardPage = new DashboardPage(page);
await loginPage.goto();
await loginPage.acceptCookie();
await loginPage.clickOnCreateAccount();
await registerPage.isRegisterPageOpened();
await registerPage.clickOnCreateDemoAccountBtn();
await dashboardPage.fillOnboardingQuestions();
await dashboardPage.isHeaderDisplayed('Projects');
});

test(qase(54,'ON-27 Sign up with email of existing user'), async ({ page }) => {
const loginPage = new LoginPage(page);
const registerPage = new RegisterPage(page);
await loginPage.goto();
await loginPage.clickOnCreateAccount();
await registerPage.isRegisterPageOpened();
await registerPage.enterEmail(process.env.LOGIN_EMAIL);
await registerPage.enterPassword(process.env.LOGIN_PWD);
await registerPage.clickOnCreateAccountBtn();
await registerPage.isFullNameFieldDisplayed();
});

test.afterEach(async ({ page }, testInfo) => {
await updateTestResults(testInfo.status, testInfo.retry)
Expand Down

0 comments on commit 1727821

Please sign in to comment.