Skip to content

Commit

Permalink
Merge branch 'url-share' of github.com:Program-AR/pilas-bloques-react…
Browse files Browse the repository at this point in the history
… into url-share
  • Loading branch information
tfloxolodeiro committed Dec 11, 2023
2 parents 10d1229 + d658df5 commit 56d65be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export const ShareButtons = () => {

return <>
<Stack direction="row" justifyContent="space-between" alignItems='center'>
{sharedId ? <SaveButton /> : <ShareUrlButton />}
{// If the challenge has already been saved, show Save, else show Share, which saves for the first time.
sharedId ? <SaveButton /> : <ShareUrlButton />
}
<DownloadButton />
</Stack>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/test/shareByUrl.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe("Share by url", () => {
const urlText = await screen.findByRole('textbox')

//The url text is not changing in the text
expect(urlText.getAttribute('value')).toBe("localhost:3000/#/desafio/guardado/newShared")
expect(urlText.getAttribute('value')).toBe(`${process.env.REACT_APP_PB_APP_URL}/#/desafio/guardado/newShared`)
})

})
Expand Down

0 comments on commit 56d65be

Please sign in to comment.