Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Li committed May 30, 2024
1 parent bebe593 commit 777e9e2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions selectors/milo/marketo.block.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export default class Marketo {
this.phone = this.marketo.locator('input[name="Phone"]');
this.company = this.marketo.locator('input[name="mktoFormsCompany"]');
this.functionalArea = this.marketo.locator(
'select[name="mktoFormsFunctionalArea"]'
'select[name="mktoFormsFunctionalArea"]',
);
this.country = this.marketo.locator('select[name="Country"]');
this.state = this.marketo.locator('select[name="State"]');
this.postalCode = this.marketo.locator('input[name="PostalCode"]');
this.jobTitle = this.marketo.locator('select[name="mktoFormsJobTitle"]');
this.primaryProductInterest = this.marketo.locator(
'select[name="mktoFormsPrimaryProductInterest"]'
'select[name="mktoFormsPrimaryProductInterest"]',
);
this.companyType = this.marketo.locator(
'select[name="mktoFormsCompanyType"]'
'select[name="mktoFormsCompanyType"]',
);
this.submitButton = this.marketo.locator('#mktoButton_new');
}
Expand Down Expand Up @@ -184,7 +184,7 @@ export default class Marketo {

async getPOI() {
const poi = await this.page.evaluate(
'window.mcz_marketoForm_pref.program.poi'
'window.mcz_marketoForm_pref.program.poi',
);
return poi;
}
Expand All @@ -203,11 +203,11 @@ export default class Marketo {
* and that the value isn't empty.
* @param {...any} inputFields the input fields of the form being tested.
*/
async checkInputPlaceholders(...inputFields) {
static async checkInputPlaceholders(...inputFields) {
inputFields.forEach(async (el) => {
expect(el).toHaveAttribute('placeholder')
const placeholder = await el.getAttribute('placeholder')
expect(el).toHaveAttribute('placeholder');
const placeholder = await el.getAttribute('placeholder');
expect(placeholder.length).toBeGreaterThan(1);
})
});
}
}
26 changes: 13 additions & 13 deletions tests/milo/marketo.block.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ test.describe('Marketo block test suite', () => {
});

await test.step('step-2: check the input field placeholders', async () => {
await marketoBlock.checkInputPlaceholders(
await MarketoBlock.checkInputPlaceholders(
marketoBlock.firstName,
marketoBlock.lastName,
marketoBlock.email,
marketoBlock.company,
marketoBlock.phone,
marketoBlock.postalCode,
)
})
);
});

await test.step('step-3: Submit the form with valid inputs', async () => {
await marketoBlock.submitFullTemplateForm();
Expand All @@ -202,15 +202,15 @@ test.describe('Marketo block test suite', () => {
});

await test.step('step-2: check the input field placeholders', async () => {
await marketoBlock.checkInputPlaceholders(
await MarketoBlock.checkInputPlaceholders(
marketoBlock.firstName,
marketoBlock.lastName,
marketoBlock.email,
marketoBlock.company,
marketoBlock.phone,
marketoBlock.postalCode,
)
})
);
});

await test.step('step-3: Submit the form with valid inputs', async () => {
await marketoBlock.submitFullTemplateForm('Adobe Advertising Cloud');
Expand All @@ -231,18 +231,18 @@ test.describe('Marketo block test suite', () => {
await page.waitForLoadState('domcontentloaded');
await expect(page).toHaveURL(testPage);

// Need this wait to avoid failed form submission during parallel runs
// Need this wait to avoid failed form submission during parallel runs
await page.waitForTimeout(WAIT_TIME);
});

await test.step('step-2: check the input field placeholders', async () => {
await marketoBlock.checkInputPlaceholders(
await MarketoBlock.checkInputPlaceholders(
marketoBlock.firstName,
marketoBlock.lastName,
marketoBlock.email,
marketoBlock.company,
)
})
);
});

await test.step('step-3: Submit the form with valid inputs', async () => {
await marketoBlock.submitExpandedTemplateForm();
Expand All @@ -269,13 +269,13 @@ test.describe('Marketo block test suite', () => {
});

await test.step('step-2: check the input field placeholders', async () => {
await marketoBlock.checkInputPlaceholders(
await MarketoBlock.checkInputPlaceholders(
marketoBlock.firstName,
marketoBlock.lastName,
marketoBlock.email,
marketoBlock.company,
)
})
);
});

await test.step('step-3: Submit the form with valid inputs', async () => {
await marketoBlock.submitEssentialTemplateForm();
Expand Down

0 comments on commit 777e9e2

Please sign in to comment.