This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2018-01-15T13:48:50.107Z","extensionVersion":"v2.8.7"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// <para>Runs the Dropbox OAuth authorization process if not yet authenticated.</para> | |
/// <para>Upon completion <seealso cref="OnAuthenticated"/> is called</para> | |
/// </summary> | |
/// <returns>An asynchronous task.</returns> | |
public async Task Authorize() | |
{ | |
if (string.IsNullOrWhiteSpace(this.AccessToken) == false) | |
{ | |
// Already authorized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void WebViewOnNavigating(object sender, WebNavigatingEventArgs e) | |
{ | |
if (!e.Url.StartsWith(RedirectUri, StringComparison.OrdinalIgnoreCase)) | |
{ | |
// we need to ignore all navigation that isn't to the redirect uri. | |
return; | |
} | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var client = new DropboxClient(this.AccessToken)) | |
{ | |
// List files | |
var list = await client.Files.ListFolderAsync(string.Empty); | |
IList<Metadata> entries = list?.Entries; | |
// Get file as bytes | |
var response = await client.Files.DownloadAsync(file); | |
var bytes = response?.GetContentAsByteArrayAsync(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
collectCoverage: true, | |
collectCoverageFrom: [ | |
"**/*.{ts,tsx}", | |
"!**/node_modules/**", | |
"!**/vendor/**", | |
"!**/__mocks__/**", | |
"!**/__snapshots__/**", | |
"!**/android/**", | |
"!**/ios/**", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo Upload code coverage | |
echo Token: "$(CODECOV_TOKEN)" | |
codecov -t "$(CODECOV_TOKEN)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wrapper = TestRenderer.create(<CognitoLogin />); | |
const state: ICognitoLoginState = { | |
formState: 'Register', | |
code: 'testcode', | |
userInput: { email: 'bogus@test.com', password: 'testPw' }, | |
result: undefined, | |
}; | |
wrapper.root.instance.setState(state); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('On forgot password should not throw', () => { | |
const wrapper = TestRenderer.create(<CognitoLogin />); | |
const child = wrapper.root.findByProps({ | |
testID: 'ForgotForm', | |
}); | |
expect(child).toBeDefined(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import TestRenderer from 'react-test-renderer'; | |
import CognitoLogin from './CognitoLogin'; | |
import _ from 'lodash'; | |
it('When no `code` or `email` `onSavePress` should set `message` to `Need code and user e-mail`', async (done) => { | |
// Arrange | |
const wrapper = TestRenderer.create(<CognitoLogin />); | |
const child = wrapper.root.findByProps({ | |
testID: 'ForgotForm', |
OlderNewer