Skip to content

Conversation

TonySynenko
Copy link
Contributor

@TonySynenko TonySynenko commented Jul 26, 2019

No description provided.

Copy link
Contributor

@amirrustam amirrustam left a comment

Choose a reason for hiding this comment

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

@TonySynenko can you add a Cypress test for the top banner to ensure it displays when expected. You can mock Contentful data if necessary.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

So when I try to run npm start, I get this error:

/Users/jennifer/Dev/cypress-documentation/node_modules/contentful/dist/contentful.node.js:7404
    throw new TypeError('Expected parameter accessToken');
    ^

TypeError: Expected parameter accessToken
    at Module.createClient (/Users/jennifer/Dev/cypress-documentation/node_modules/contentful/dist/contentful.node.js:7404:11)
    at Object.<anonymous> (/Users/jennifer/Dev/cypress-documentation/index.js:26:37)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:607:3

I do see a couple of environment variables being referenced in the commits (like GATSBY_CONTENTFUL_ACCESS_TOKEN), but no updates to the README on where to access these tokens.

Also, I am VERY hesitant to accept any pull requests that would require access to some internal access token that our contributors would be unable to or have difficulty accessing. We get a lot of outside contributions in this project and I don't want to hinder those.

What's the process going to be for regular contributors here?

@amirrustam
Copy link
Contributor

amirrustam commented Jul 26, 2019

Since these private tokens and the top banner are not the concern of our community contributors, we should simply not throw an error and not display the banner when these env vars are not present.

@TonySynenko TonySynenko force-pushed the add-contentful-based-top-banner branch from 4c7e9fe to 287d5dc Compare July 29, 2019 11:19
Hexo index.js && data fetch && swig && styles && banners_actualization script
@TonySynenko TonySynenko force-pushed the add-contentful-based-top-banner branch from 287d5dc to b51a0ce Compare July 29, 2019 11:55
@jennifer-shehane
Copy link
Member

[11:58:35] Finished 'post:build' after 47 ms
last commit: b51a0cee06d527eab1163a8e81815355f75ddd50
Fatal Error: ENOENT: no such file or directory, open 'public/build.json'
    at Object.fs.openSync (fs.js:646:18)
    at fs.writeFileSync (fs.js:1299:33)
    at save (/root/cypress-documentation/node_modules/ggit/src/last-commit-id.js:14:3)
    at saveBuildFile (/root/cypress-documentation/node_modules/ggit/src/last-commit-id.js:18:3)
    at saveIntoFile (/root/cypress-documentation/node_modules/ggit/src/last-commit-id.js:29:5)
    at /root/cypress-documentation/node_modules/ggit/src/last-commit-id.js:82:14
    at tryCatcher (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/root/cypress-documentation/node_modules/ggit/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

jennifer-shehane and others added 5 commits July 31, 2019 11:32
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Lookin' good! Got it up and working.

@amirrustam amirrustam merged commit c336823 into develop Jul 31, 2019
TonySynenko added a commit that referenced this pull request Jul 31, 2019
jennifer-shehane pushed a commit that referenced this pull request Aug 5, 2019
* Adding HTML form validation to FAQ, closes #1824 (#1919)

* update ja/cn docs to match develop changes

* parseSpecialCharSequences docs (#1886)

* Add file for 3.5.0 changelog

* Added documentation for disableSpecialCharSequences option for… (#1885)

* Added documentation for disableSpecialCharSequences option for cy.type

* update description of disableSpecialChar... to be more active voice


Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* rename `disableSpecialChars` opions (#1903)

* Revert "Added documentation for disableSpecialCharSequences option for… (#1885)"

This reverts commit 298df85.

* rename disableSpecialCharSequences

* fix description of 'parseSpecial...' - was opposite meaning, still mentioned disable

- Add notes about how to disable special char sequences in more places
in type doc.

* Remove changelog so I can just commit new feature changes

* chore(deps): update dependency @types/jest to version 24.0.16 🌟 (#1920)



Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* Update continuous-integration.md (#1912)

* copy changes to ja/cn file

* Add elm-batteries project template to plugins (#1925)

* chore(deps): Update dependency to version 🌟 (#1929)



Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Add example of setting 'parseSpecialCharSequences' to false (#1927)

* update wait requirements to specify when it can be used as chil… (#1930)

- also alphabetize requirements methods

* Improve GitHub integration "run group" link target (#1924)

* Improve GitHub integration "run group" link target

* Update ja locale link

* Update zh-cn locale link

* Use internal link syntax

* chore(deps): update dependency husky to version 3.0.2 🌟 (#1922)



Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Remove deps that appear to be unused (mostly devDeps) (#1931)

* Clarify some of the options available in Module API (#1934)

* Add contentful based top banner (#1911)

* data fetch && swig && styles

* banners actualization script

* finish (?)

* finish (?)

* remove "extends" from eslint settings

* remove sensitive info

* update hexo index file

* banner padding fix

* remove Promise.protoype.finally() from hexo index script

* Contentful driven banners, parsed dynamically:
Hexo index.js && data fetch && swig && styles && banners_actualization script

* add cypress test for banners

* docs update v1

* Fix toc width so that it doesn't create a horizontal scrollbar on smaller heights screen.

* package-lock

* just a few tweaks to the README instructions

* fixed conflict issue from package.json merge

* add GitHub Enterprise integration support notice (#1936)

* add GitHub Enterprise integration support notice

* add japanese and chinese versions

* remove remove package that was accidentally installed

* Update banner tests to be more resilient to changes in content

- instead of regex removals, use utf8 encode the html content provided
- use Cypress commands instead of direct javascript - so we can have
better logs during CI runs and also have retryability.

* package-lock

* Handle html entities also

- Basically - we’re done parsing that HTML, what a mess. Only going to
parse the text within the HTML now for the tests.
- Add an html entity within the banners.yml so we make sure these are
tested.

* Add a catch handler to the contenful.getEntries - that will continue to run hexo.init if failed

* gitignore banners.yml??

* Header partial cache removal (#1937)



Co-authored-by: null <anthony.synenko@gmail.com>

* Fix issue with righthand toc slipping under header during test

* add cy.get by name attribute example (#1941)

* add cy.get by name attribute example

* copy to ja/cn


Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* add robots.txt and copy it to public folder during build (#1942)

* add robots.txt and copy it to public folder during build

* add robots.txt test

* add custom methods on Cypress for checking env name

* switch another spec to use method

* Add hash scroll offset (#1945)

* temporary workaround for hash scroll

* Add tests to ensure the docs scroll properly when clicking on a toc link


Co-authored-by: null <anthony.synenko@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* Add mobile header fix (#1949)

* temporary workaround for mobile header

* scroll container to top

* toc fix

* Add note for <-loopback> usage

* Update proxy-configuration.md
@matthamil matthamil deleted the add-contentful-based-top-banner branch April 14, 2021 19:52
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.

5 participants