Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-daml-app: make tests pass on m1 #15031

Merged
merged 1 commit into from Sep 23, 2022
Merged

create-daml-app: make tests pass on m1 #15031

merged 1 commit into from Sep 23, 2022

Conversation

garyverhaegen-da
Copy link
Contributor

This is very much a "just make it work" type of patch. The main issues were:

  • A bunch of type errors in the index.test.ts file when opened in VS Code. I'm not sure how it happened, but it's possible I'm just using a more recent TS compiler than whoever edited this last.
  • localhost, on my machine at least, resolves to ::1, and therefore the connections were just not established. I've opted for replacing localhost with explicit 127.0.0.1.
  • npm-cli.js was not an executable in my PATH.

Those tests are obviously not tested by CI, so please review carefully / test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END

Copy link
Collaborator

@remyhaemmerle-da remyhaemmerle-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look reasonable.

@garyverhaegen-da
Copy link
Contributor Author

Additional testing steps taken:

  • Build daml-sdk-head on this branch.
  • Create a new project with daml-head new myproject --template=create-daml-app to get a new project using the updated config.ts file.
  • Manually change the version strings from 0.0.0 to 2.3.4 in both daml.yaml and ui/package.json. We don't actually care all that much about the daml ones here, but consistency is nice, and we need a "real", published version number for npm to pick up.
  • Manually follow the "Your First Feature" instructions.
  • Run daml build, daml codegen js.
  • cd ui
  • npm add --only=dev puppeteer wait-on @types/jest @types/node @types/puppeteer @types/wait-on per the Testing page.
  • Run npm install.
  • Get a this-branch version of the Testing docs page and copy the index.test.ts file from there.
  • Run daml studio to create the file. Rename the dependency from create-daml-app to myproject in ui/src/index.test.ts, ui/src/component/MessageEdit.tsx and ui/src/component/MessageList.tsx. Verify that there are no errors after that.
  • Run npm test. Marvel at the newfound green-ness.

This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
@garyverhaegen-da garyverhaegen-da merged commit dd5543e into main Sep 23, 2022
@garyverhaegen-da garyverhaegen-da deleted the fix-gsg-tests branch September 23, 2022 02:57
garyverhaegen-da added a commit that referenced this pull request Sep 23, 2022
This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`, and won't be for
  most users, but `npm` is not on our testing infrastructure's `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
garyverhaegen-da added a commit that referenced this pull request Sep 23, 2022
This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`, and won't be for
  most users, but `npm` is not on our testing infrastructure's `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
garyverhaegen-da added a commit that referenced this pull request Sep 27, 2022
This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`, and won't be for
  most users, but `npm` is not on our testing infrastructure's `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
garyverhaegen-da added a commit that referenced this pull request Sep 27, 2022
This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`, and won't be for
  most users, but `npm` is not on our testing infrastructure's `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
garyverhaegen-da added a commit that referenced this pull request Sep 27, 2022
This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`, and won't be for
  most users, but `npm` is not on our testing infrastructure's `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants