Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11166

Implement an Appium test checking if contact birthday is saved properly

Details

    Attachments

      Issue Links

        Activity

          githubbot ASF GitHub Bot added a comment -

          GitHub user alsorokin opened a pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123

          CB-11166 Added an Appium tests to check for contact's birthday

          https://issues.apache.org/jira/browse/CB-11166

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/MSOpenTech/cordova-plugin-contacts CB-11166

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-plugin-contacts/pull/123.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #123


          commit 0a49fcfc4a4037d5ae86b58c4dfce2df78c526a7
          Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
          Date: 2016-04-28T12:39:13Z

          CB-11166 Added an Appium tests to check for contact's birthday


          githubbot ASF GitHub Bot added a comment - GitHub user alsorokin opened a pull request: https://github.com/apache/cordova-plugin-contacts/pull/123 CB-11166 Added an Appium tests to check for contact's birthday https://issues.apache.org/jira/browse/CB-11166 You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-contacts CB-11166 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-contacts/pull/123.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #123 commit 0a49fcfc4a4037d5ae86b58c4dfce2df78c526a7 Author: Alexander Sorokin <alexander.sorokin@akvelon.com> Date: 2016-04-28T12:39:13Z CB-11166 Added an Appium tests to check for contact's birthday
          githubbot ASF GitHub Bot added a comment -

          Github user riknoll commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61467646

          — Diff: appium-tests/common/common.spec.js —
          @@ -114,14 +116,15 @@ describe('Contacts Android', function () {
          })
          .click()
          .context(webviewContext)

          • .executeAsync(function (pID, cb) {
            + .executeAsync(function (pID, getOnlyBirthday, cb) {
              • End diff –

          Why do you need to pass the `getOnlyBirthday` flag? Is there an issue with just always returning the full contact and checking the birthday field as part of the birthday spec?

          githubbot ASF GitHub Bot added a comment - Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61467646 — Diff: appium-tests/common/common.spec.js — @@ -114,14 +116,15 @@ describe('Contacts Android', function () { }) .click() .context(webviewContext) .executeAsync(function (pID, cb) { + .executeAsync(function (pID, getOnlyBirthday, cb) { End diff – Why do you need to pass the `getOnlyBirthday` flag? Is there an issue with just always returning the full contact and checking the birthday field as part of the birthday spec?
          githubbot ASF GitHub Bot added a comment -

          Github user riknoll commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61467710

          — Diff: appium-tests/common/common.spec.js —
          @@ -133,7 +136,7 @@ describe('Contacts Android', function () {
          function renameContact(oldName, newGivenName, newFamilyName) {
          return driver
          .context(webviewContext)

          • .setAsyncScriptTimeout(4 * MINUTE)
            + .setAsyncScriptTimeout(7 * MINUTE)
              • End diff –

          Why the timeout increase?

          githubbot ASF GitHub Bot added a comment - Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61467710 — Diff: appium-tests/common/common.spec.js — @@ -133,7 +136,7 @@ describe('Contacts Android', function () { function renameContact(oldName, newGivenName, newFamilyName) { return driver .context(webviewContext) .setAsyncScriptTimeout(4 * MINUTE) + .setAsyncScriptTimeout(7 * MINUTE) End diff – Why the timeout increase?
          githubbot ASF GitHub Bot added a comment -

          Github user alsorokin commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61468116

          — Diff: appium-tests/common/common.spec.js —
          @@ -114,14 +116,15 @@ describe('Contacts Android', function () {
          })
          .click()
          .context(webviewContext)

          • .executeAsync(function (pID, cb) {
            + .executeAsync(function (pID, getOnlyBirthday, cb) {
              • End diff –

          Yeah, instead of Date object Appium gets just empty object in the full contact.
          I haven't been able to find it in Appium docs so I'm assuming it's just an undocumented quirk.

          githubbot ASF GitHub Bot added a comment - Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61468116 — Diff: appium-tests/common/common.spec.js — @@ -114,14 +116,15 @@ describe('Contacts Android', function () { }) .click() .context(webviewContext) .executeAsync(function (pID, cb) { + .executeAsync(function (pID, getOnlyBirthday, cb) { End diff – Yeah, instead of Date object Appium gets just empty object in the full contact. I haven't been able to find it in Appium docs so I'm assuming it's just an undocumented quirk.
          githubbot ASF GitHub Bot added a comment -

          Github user riknoll commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61468850

          — Diff: appium-tests/common/common.spec.js —
          @@ -114,14 +116,15 @@ describe('Contacts Android', function () {
          })
          .click()
          .context(webviewContext)

          • .executeAsync(function (pID, cb) {
            + .executeAsync(function (pID, getOnlyBirthday, cb) {
              • End diff –

          Okay, that's fine then. It might be better to just always return a contact object but convert the birthday to a string so that the function always returns the same type.

          githubbot ASF GitHub Bot added a comment - Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61468850 — Diff: appium-tests/common/common.spec.js — @@ -114,14 +116,15 @@ describe('Contacts Android', function () { }) .click() .context(webviewContext) .executeAsync(function (pID, cb) { + .executeAsync(function (pID, getOnlyBirthday, cb) { End diff – Okay, that's fine then. It might be better to just always return a contact object but convert the birthday to a string so that the function always returns the same type.
          githubbot ASF GitHub Bot added a comment -

          Github user alsorokin commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61469221

          — Diff: appium-tests/common/common.spec.js —
          @@ -133,7 +136,7 @@ describe('Contacts Android', function () {
          function renameContact(oldName, newGivenName, newFamilyName) {
          return driver
          .context(webviewContext)

          • .setAsyncScriptTimeout(4 * MINUTE)
            + .setAsyncScriptTimeout(7 * MINUTE)
              • End diff –

          Right now updating a contact on our osx-android builder takes a long time (around 5 minutes).
          As it is a minor tweak I thought it's OK to include it with another commit.
          I'm not sure though that it is a good idea to just increase timeout instead of investigating what's wrong with the simulator on the slave.

          githubbot ASF GitHub Bot added a comment - Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61469221 — Diff: appium-tests/common/common.spec.js — @@ -133,7 +136,7 @@ describe('Contacts Android', function () { function renameContact(oldName, newGivenName, newFamilyName) { return driver .context(webviewContext) .setAsyncScriptTimeout(4 * MINUTE) + .setAsyncScriptTimeout(7 * MINUTE) End diff – Right now updating a contact on our osx-android builder takes a long time (around 5 minutes). As it is a minor tweak I thought it's OK to include it with another commit. I'm not sure though that it is a good idea to just increase timeout instead of investigating what's wrong with the simulator on the slave.
          githubbot ASF GitHub Bot added a comment -

          Github user alsorokin commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61469757

          — Diff: appium-tests/common/common.spec.js —
          @@ -114,14 +116,15 @@ describe('Contacts Android', function () {
          })
          .click()
          .context(webviewContext)

          • .executeAsync(function (pID, cb) {
            + .executeAsync(function (pID, getOnlyBirthday, cb) {
              • End diff –

          Good idea! I'll do it.

          githubbot ASF GitHub Bot added a comment - Github user alsorokin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61469757 — Diff: appium-tests/common/common.spec.js — @@ -114,14 +116,15 @@ describe('Contacts Android', function () { }) .click() .context(webviewContext) .executeAsync(function (pID, cb) { + .executeAsync(function (pID, getOnlyBirthday, cb) { End diff – Good idea! I'll do it.
          githubbot ASF GitHub Bot added a comment -

          Github user alsorokin commented on the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#issuecomment-215745788

          @riknoll Addressed your comment.
          Also as a minor change, switched to `tapElementByXPath` function for iOS.

          githubbot ASF GitHub Bot added a comment - Github user alsorokin commented on the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#issuecomment-215745788 @riknoll Addressed your comment. Also as a minor change, switched to `tapElementByXPath` function for iOS.
          githubbot ASF GitHub Bot added a comment -

          Github user riknoll commented on a diff in the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61609305

          — Diff: appium-tests/common/common.spec.js —
          @@ -133,7 +136,7 @@ describe('Contacts Android', function () {
          function renameContact(oldName, newGivenName, newFamilyName) {
          return driver
          .context(webviewContext)

          • .setAsyncScriptTimeout(4 * MINUTE)
            + .setAsyncScriptTimeout(7 * MINUTE)
              • End diff –

          Yeah, I agree. We should figure out what's going on

          githubbot ASF GitHub Bot added a comment - Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#discussion_r61609305 — Diff: appium-tests/common/common.spec.js — @@ -133,7 +136,7 @@ describe('Contacts Android', function () { function renameContact(oldName, newGivenName, newFamilyName) { return driver .context(webviewContext) .setAsyncScriptTimeout(4 * MINUTE) + .setAsyncScriptTimeout(7 * MINUTE) End diff – Yeah, I agree. We should figure out what's going on
          githubbot ASF GitHub Bot added a comment -

          Github user riknoll commented on the pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/123#issuecomment-215809141

          LGTM!

          githubbot ASF GitHub Bot added a comment - Github user riknoll commented on the pull request: https://github.com/apache/cordova-plugin-contacts/pull/123#issuecomment-215809141 LGTM!

          Commit 956c76b50da1d8c7e86de333ce6748b046b3ce83 in cordova-plugin-contacts's branch refs/heads/master from alsorokin
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=956c76b ]

          CB-11166 Appium tests: Added a check for contact's birthday

          jira-bot ASF subversion and git services added a comment - Commit 956c76b50da1d8c7e86de333ce6748b046b3ce83 in cordova-plugin-contacts's branch refs/heads/master from alsorokin [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=956c76b ] CB-11166 Appium tests: Added a check for contact's birthday
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-plugin-contacts/pull/123

          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-contacts/pull/123

          People

            alsorokin Alexander Sorokin
            alsorokin Alexander Sorokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: