I got an example from internet that was using:
GBHFacebookImagePicker.pickerConfig.title = "Album"
But when I compile it results a compile error: "Value of type 'GBHFacebookPickerConfig' has no member 'texttitle'
I found the solution, due to updated pod the correct way right now to set title is:
GBHFacebookImagePicker.pickerConfig.textConfig.localizedTitle = "Album title"
Related
I am trying to implement Checks into my GitHub app. My App is built with probot.
I am just not able to implement the checks. I have tried going through the documentation which demonstrate ruby example that includes several different setups(not sure if required with probot).
I just got confused with the example there.
Below is the code that resides in my index.js :
app.on('check_suite.requested', async context =>{
console.log('************------------ check suite requested')
await context.github.checks.create({
mediaType:'application/vnd.github.antiope-preview+json',
name : 'test-check-1',
head_sha: context.payload.check_suite.after,
conclusion: "success"
})
})
I get below error
ERROR probot: Cannot read property 'map' of undefined
TypeError: Cannot read property 'map' of undefined
The error log complains about index.js:24:35, which is precisely the createmethod in the line await context.github.checks.create
Is the above code sufficient to create the check test-check-1 or do I need to take care of other things too. I already have the "Required status checks to pass before merging" option enabled under the branch protection settings of my repo.
And that section displays Sorry, we couldn’t find any status checks in the last week for this repository.
Not sure how to connect everything.
EDIT 1 : START
Below is the code after including the required params as suggested by #OscarDOM :--
app.on('check_suite.requested', async context =>{
console.log('*****check suite requested*****')
context.github.checks.create({
owner:context.payload.repository.owner,
repo:context.payload.repository.name,
mediaType:'application/vnd.github.antiope-preview+json',
name : 'test-check-1',
head_sha: context.payload.check_suite.after,
conclusion: "success"
})
})
Unfortunately, I still get the same error at exact same line and column.
EDIT 1 : END
EDIT 2 : START
Below is the final working code after including corrections for the mediaType parameter :
Please note there was one more mistake I had to correct and that is the value owner param. The correct way is to specify context.payload.repository.owner.login and this was something I had recently learnt from this StackOverflow post
app.on('check_suite.requested', async context =>{
console.log('*****check suite requested*****')
context.github.checks.create({
owner:context.payload.repository.owner.login,
repo:context.payload.repository.name,
mediaType: { previews: ['antiope']},
name : 'test-check-1',
head_sha: context.payload.check_suite.after,
conclusion: "success"
})
})
EDIT 2 : END
Would it be possible you need to pass the owner and the repository to context.github.checks.create() method? I think they are required properties: https://octokit.github.io/rest.js/v17#checks
Also, make sure the Github App has the following permissions: checks:write(https://developer.github.com/v3/activity/events/types/#checkrunevent)
Also, checking your code snippet, seems that you are not using the mediaType properly. If you check the type definition, mediaType has the following structure:
mediaTypes: {
format?: string,
previews?: string[]
}
Reference here: https://octokit.github.io/rest.js/v17#previews
Can you try it with this?
app.on('check_suite.requested', async context =>{
console.log('************------------ check suite requested')
await context.github.checks.create({
owner: '<YOUR_ORGANIZATION>',
repo: '<YOUR_REPO>',
mediaType: { previews: ['antiope']},
name : 'test-check-1',
head_sha: context.payload.check_suite.after,
conclusion: "success"
})
})
As a general feedback, I suggest you to try TypeScript, these issues would have been spotted using it :)
Like the title says, is it possible the tutorial at https://www.arangodb.com/tutorials/spring-data/ is outdated? I'm having several problems, but don't know how to workaround the last one:
Part 2, "Save and read an entity"
I get an error: method getId() is undefined.
Workaround: I added a getter in class Character.
Also in "Save and read an entity"
final Character foundNed = repository.findOne(nedStark.getId());
The method findOne(Example) in the type QueryByExampleExecutor is not applicable for the arguments (String)
Workaround: I used find by example:
final Optional<Person> foundNed = repository.findOne(Example.of(nedStark));
Part 1, "Create a Configuration class"
public class DemoConfiguration extends AbstractArangoConfiguration {
Gives me an error:
"No constructor with 1 argument defined in class 'com.arangodb.springframework.repository.ArangoRepositoryFactoryBean'"
Workaround: ?
Can anyone point me in the right direction?
I found the demo project on github: https://github.com/arangodb/spring-data-demo
Number 1: They use a getter too.
Number 2: Was my fault, I did try ArangoRepository (of Character, Integer) but forgot that Id is a string.
Number 3: They don't seem use any Configuration (AbstractArangoConfiguration) class in the source at all although it is still mentioned in that tutorial. I think now the config and connection is handled by spring autoconfigure. Though I would like to know how the Arango driver is set, all I could find that may point further is ArangoOperations.
Anyway it works now, maybe this helps somebody else who is having the same problems.
Is it possible that if I write in my integration test:
all("a")[0]
the test goes well but when writing:
click_on(all("a")[0])
I get the error message "unable to find link or button"?
The has
href="javascript:void(0)"
The element return by all("a")[0] have a .click function.
all("a")[0].click
Or instead find by the name
all("#name_of_link").click
currently I need to add log4js support in my test case, like below:
it(' QuestionController saveQuestion method Testing ', inject(function(localStorageService) {
***var log4js = require('log4js');
var logger = log4js.getLogger();
logger.debug("Some debug messages");***
expect({}).toEqual(localStorageService.get('questionInfoStorage'));
}));
I have tried to include the log4js js and repire js file in karma.conf.js file, it is not working and giving some error like "Module name "events" has not been loaded yet for context" something.
Is there anybody coming the same issue previously? thanks advance!
I have a project in SWIFT where I use AFNetworking and AFNetworkActivityLogger for debugging. I am having troubles to change the "level" attribute. By default it is set to AFLoggerLevelInfo, but I need it to AFLoggerLevelDebug.
I tried the following in my AppDelegate.swift:
AFNetworkActivityLogger.sharedLogger().level = AFLoggerLevelDebug
which results in "Use of unresolved identifier 'AFLoggerLevelDebug'". Anyone knows how to change the level of AFNetworkActivityLogger?
The AFHTTPRequestLoggerLevel is an enum, so you want:
AFNetworkActivityLogger.sharedLogger().level = AFHTTPRequestLoggerLevel.AFLoggerLevelDebug
or
AFNetworkActivityLogger.sharedLogger().level = .AFLoggerLevelDebug