Skip to content

Commit

Permalink
Add GitHub Actions workflow for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sokuya committed Dec 3, 2024
1 parent dd3cbf3 commit 65cf887
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ jobs:
run: npm ci # Install dependencies using 'npm ci' for CI/CD

- name: Run tests
env:
LINKEDIN_USERNAME: ${{ secrets.LINKEDIN_USERNAME }}
LINKEDIN_PASSWORD: ${{ secrets.LINKEDIN_PASSWORD }}
run: npm test # Run test script defined in package.json
2 changes: 2 additions & 0 deletions src/contacts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ describe('Create iOS Appium connection', function () {
* Signs in to LinkedIn using the provided credentials.
*/
it('Test for adding new contact and opening its LinkedIn profile and singing-in', async () => {
console.log('LinkedIn Username:', process.env.LINKEDIN_USERNAME);
console.log('LinkedIn Password:', process.env.LINKEDIN_PASSWORD);
const { firstName, lastName, company, phone, email, socialProfile } = TestData.contacts.default;
await contactsPage.addNewContact(firstName, lastName, company, phone, email, socialProfile);
console.log(`Using LinkedIn username: ${credentials.username}`)
Expand Down
5 changes: 0 additions & 5 deletions src/pages/LinkedInPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ export class LinkedInPage {
linkedInElements = (await this.driver.$$(
'-ios class chain:**/XCUIElementTypeCell[`name == "LinkedIn"`]',
) as unknown) as WebdriverIO.Element[];
//
// linkedInElements = await this.driver.$$(
// '-ios class chain:**/XCUIElementTypeCell[`name == "LinkedIn"`]',
// )
//
if (linkedInElements.length > 0) {
// If the element is found (length at least 1), click it and break the loop
await linkedInElements[0].click();
Expand Down

0 comments on commit 65cf887

Please sign in to comment.