This file contains hidden or 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
| class TestableClass { | |
| public foo() { /* do something */ } | |
| public bar() { /* do something */ } | |
| } | |
| class TestableClassTest { | |
| // test suite for Foo | |
| @Nested | |
| class Foo { |
This file contains hidden or 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 { status_context, description, state, sha, target_url, owner, repo } = process.env; | |
| if (state.length === 0 || !["error", "failure", "pending", "success"].includes(state)) { | |
| core.setFailed('"state" input cannot be empty.'); | |
| return; | |
| } | |
| if (!["error", "failure", "pending", "success"].includes(state)) { | |
| core.setFailed('"state" must be a string input with possible value of (...).'); | |
| return; |
This file contains hidden or 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 { useState } from 'react'; | |
| import { Amplify, Auth } from 'aws-amplify'; | |
| import { | |
| withAuthenticator, | |
| AccountSettings, | |
| Alert, | |
| Button, | |
| Card, | |
| Flex, | |
| Heading, |
This file contains hidden or 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
| Angular | |
| + <div class="amplify-flex amplify-field amplify-textfield amplify-passwordfield> | |
| <label class="amplify-label" /> | |
| <div class="amplify-fieldgroup amplify-flex"> | |
| + <div class="amplify-field-group__field-wrapper"> | |
| <input class="amplify-input amplify-fieldgroup__control /> | |
| </div> | |
| <div class="amplify-field-group__outer-end"> | |
| - <button class="amplify-input amplify-fieldgroup__control amplify-field__show-password /> |
This file contains hidden or 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
| Feature: Reset Password | |
| ... | |
| (adding a new scenario below:) | |
| Scenario: | |
| When I type my "username" with status "CONFIRMED" | |
| And I intercept '{ "headers": { "X-Amz-Target": "AWSCognitoIdentityProviderService.ForgotPassword" } }' with fixture "reset-password" | |
| And I click the "Send code" button | |
| Then I will be redirected to the confirm forgot password page |
This file contains hidden or 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 { get } from 'lodash'; | |
| import { ActionObject, createMachine, sendUpdate, StatesConfig } from 'xstate'; | |
| import { Auth } from 'aws-amplify'; | |
| import { passwordMatches, runValidators } from '../../../validators'; | |
| import { AuthEvent, SignUpContext } from '../../../types'; | |
| import { | |
| clearError, | |
| clearFormValues, |
This file contains hidden or 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
| // add `allowedCommonJsDependencies` to `projects.architect.build.options`: | |
| "build": { | |
| "builder": "@angular-devkit/build-angular:browser", | |
| ... | |
| "options": { | |
| "allowedCommonJsDependencies": [ | |
| "@aws-crypto/crc32", | |
| "@aws-crypto/sha256-browser", | |
| "@aws-crypto/sha256-js", |
This file contains hidden or 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
| // workaround for using typescript strict mode with amplify-js. | |
| // src/types.d.ts | |
| declare module 'graphql/language/ast' { export type DocumentNode = any } | |
| declare module 'graphql/error/GraphQLError' { export type GraphQLError = any } |
This file contains hidden or 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
| // put this at the same level as aws-exports | |
| declare const awsmobile: Record<string, any> | |
| export default awsmobile; |
This file contains hidden or 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 Amplify from "aws-amplify"; | |
| import { | |
| CognitoUserInterface, | |
| onAuthUIStateChange, | |
| AuthState, | |
| } from "@aws-amplify/ui-components"; | |
| import { AmplifyAuthenticator, AmplifyTotpSetup } from "@aws-amplify/ui-react"; | |
| import { useEffect, useState } from "react"; | |
| Amplify.configure({ /** redacted */ }); |
NewerOlder