Skip to content

Commit

Permalink
Adding text checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo-diamend committed Jul 1, 2024
1 parent 865930f commit 7a93fd7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/pageObjects/careerPage/careersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ class CareersPage {
async frontPageCareer() {
await expect(this.page.getByRole('heading', { name: 'We Grow Together!' })).toBeVisible();
await expect(this.page.getByText('If you want to level up your')).toBeVisible();
await expect(this.page.getByText('If you want to level up your')).toHaveText('If you want to level up your career at a company in constant motion, you’ve come to the right place.');
await expect(this.page.getByRole('img', { name: 'Four coworkers, smiling and' })).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'We believe in fostering a' })).toBeVisible();
await expect(this.page.getByText('We encourage every member of')).toBeVisible();
await expect(this.page.getByText('We encourage every member of')).toHaveText('We encourage every member of our team to propose new ideas and make important decisions. By empowering individuals to think and act as leaders, we create a dynamic and innovative environment that drives growth and success. We nurture talent.');
await expect(this.page.getByRole('heading', { name: 'We aim to achieve the highest' })).toBeVisible();
await expect(this.page.getByText('Our challenging projects')).toBeVisible();
await expect(this.page.getByText('Our challenging projects')).toHaveText('Our challenging projects require excellent results. As a team, we embrace continuous improvement in all aspects of our work, from processes and capabilities to services. We seek self improvement. We strive as a team. We grow together.');
await expect(this.page.getByRole('img', { name: 'Author\'s picture' })).toBeVisible();
await expect(this.page.getByText('Rootstrap\'s commitment to')).toBeVisible();
await expect(this.page.getByLabel('next slide')).toBeVisible();
Expand All @@ -43,21 +46,27 @@ class CareersPage {
await this.scrollAndCheckVisibility(this.page, '[id="w-node-_1841f636-ad7f-3068-2e50-8e12f5b5b5d7-4fe11e28"]');
await expect(this.page.getByRole('heading', { name: 'Growth and Development' })).toBeVisible();
await expect(this.page.getByText('Reach your full potential')).toBeVisible();
await expect(this.page.getByText('Reach your full potential')).toHaveText('Reach your full potential with training, mentorship, feedback program.');
await expect(this.page.locator('#w-node-_06066c36-388c-45c6-d873-9183594b4aa1-4fe11e28 > .potential-icon')).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'Wellness' })).toBeVisible();
await expect(this.page.getByText('Prioritize your well-being')).toBeVisible();
await expect(this.page.getByText('Prioritize your well-being')).toHaveText('Prioritize your well-being with a comprehensive set of options for you.');
await expect(this.page.locator('#w-node-c2435a18-79d3-b482-f1e3-87667afb0287-4fe11e28 > .potential-icon')).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'Find your own balance' })).toBeVisible();
await expect(this.page.getByText('Achieve balance and')).toBeVisible();
await expect(this.page.getByText('Achieve balance and')).toHaveText('Achieve balance and fulfillment with flexible work arrangements.');
await expect(this.page.locator('#w-node-_9a353d7f-b29e-cbc4-2339-675bbdf4c03a-4fe11e28 > .potential-icon')).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'Team building' })).toBeVisible();
await expect(this.page.getByText('Foster connections and')).toBeVisible();
await expect(this.page.getByText('Foster connections and')).toHaveText('Foster connections and teamwork with opportunities for social events, team-building activities, and more.');
await expect(this.page.locator('#w-node-bc689a87-56b1-765c-8f1d-e6db6abc0c77-4fe11e28 > .potential-icon')).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'Customized processes' })).toBeVisible();
await expect(this.page.getByText('Receive prizes and')).toBeVisible();
await expect(this.page.getByText('Receive prizes and')).toHaveText('Receive prizes and recognitions, while enjoying working with the latest technologies.');
await expect(this.page.locator('#w-node-f5fbc4aa-6297-48e8-2355-4c676bdb8112-4fe11e28 > .potential-icon')).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'Digital empowerment' })).toBeVisible();
await expect(this.page.getByText('Enjoy advanced digital tools')).toBeVisible();
await expect(this.page.getByText('Enjoy advanced digital tools')).toHaveText('Enjoy advanced digital tools for improved collaboration and efficiency.');
}

async availablePositionsCareer() {
Expand All @@ -67,6 +76,7 @@ async availablePositionsCareer() {
await expect(this.page.getByRole('img', { name: 'A group of coworkers in an' })).toBeVisible();
await expect(this.page.getByRole('img', { name: 'Three young women at the' })).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'We believe that collaborative' })).toBeVisible();
await expect(this.page.getByRole('heading', { name: 'We believe that collaborative' })).toHaveText('We believe that collaborative, close-knit teams can achieve the unthinkable.');
await expect(this.page.locator('div').filter({ hasText: 'Are you up for' }).nth(3)).toBeVisible();
await expect(this.page.locator('div').filter({ hasText: 'Design ManagerArgentina/Uruguay/Colombia/US·Full-timeApply now' }).nth(3)).toBeVisible();
await expect(this.page.locator('div').filter({ hasText: 'Data EngineerArgentina/Uruguay/Colombia·Full-timeApply now' }).nth(3)).toBeVisible();
Expand All @@ -92,10 +102,10 @@ async availablePositionsCareer() {
await expect(page1.getByRole('button', { name: 'Enviar' })).toBeVisible();

// Generate random data using faker
const firstName = faker.name.firstName();
const lastName = faker.name.lastName();
const firstName = faker.person.firstName();
const lastName = faker.person.lastName();
const email = faker.internet.email();
const jobTitle = faker.name.jobTitle();
const jobTitle = faker.person.jobTitle();
const linkedin = `https://www.linkedin.com/in/${faker.internet.userName()}`;
const country = 'United States';

Expand Down

0 comments on commit 7a93fd7

Please sign in to comment.