Giter VIP home page Giter VIP logo

accounts-phony's People

Contributors

cjsauer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

accounts-phony's Issues

Examples for synchronous ChimpJS API

ChimpJS has a synchronous API, so the code samples in the README don't work. Here's what I'm doing in CoffeeScript:

module.exports = ->

  ROOT_URL = 'http://localhost:3000'
  login = (done) -> Meteor.loginWithPhony Package['csauer:accounts-phony'].Phony.user, done

  @Given 'I am logged in', ->
    @browser.url(ROOT_URL)
    @browser.timeoutsAsyncScript(5000)
    @browser.executeAsync(login)

  @Given 'I am on the Dashboard', -> @browser.url("#{ROOT_URL}/dashboard")

  @Then 'I can see my widgets', -> @browser.waitForExist("<my DOM selector>").should.equal(true)

Note: This is running with --chai so uses should instead of Jasmine's expect().

Also I probably shouldn't be writing localhost:3000, but that's another story.

Unable to import

Hi!

I'm sure this is just a simple user error. But I'm having trouble import this package into my test files.

I'm using var Phony = Package['csauer:accounts-phony'].Phony; as specified in the README.
But when I try calling loginWithPhony I get "Meteor.loginWithPhony is not a function"

Meteor.user() returns undefined

Hello,

I think I just need a clarification, because I'm not sure about what I can do with this package, and what I cannot do.

I need to "fake a login" in Meteor to unit-test roles and page access. So I'm logging with Phony, Meteor.userId() returns the correct _id of the fake user I logged in, but Meteor.user() returns undefined

Have I done something wrong or is this package not about the problem I try to solve?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.