-
Notifications
You must be signed in to change notification settings - Fork 217
task(content-server): remove intern #18905
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
Conversation
| test.describe('severity-1', () => { | ||
| // runs all mocha tests - see output here: http://127.0.0.1:3030/tests/index.html | ||
| test('content-server mocha tests', async ({ target, page }, { project }) => { | ||
| test.skip(project.name !== 'local', 'mocha tests are local only'); | ||
| await page.goto(`${target.contentServerUrl}/tests/index.html`, { | ||
| waitUntil: 'load', | ||
| }); | ||
| await page.waitForTimeout(2000); // wait for mocha to load | ||
| await page.evaluate(() => | ||
| (globalThis as any).runner.on( | ||
| 'end', | ||
| () => ((globalThis as any).done = true) | ||
| ) | ||
| ); | ||
| await page.waitForFunction( | ||
| () => (globalThis as any).done, | ||
| {}, | ||
| { timeout: 0 } | ||
| ); | ||
| const failures = await page.evaluate( | ||
| () => (globalThis as any).runner.failures | ||
| ); | ||
| expect(failures).toBe(0); | ||
| }); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading right, this was a test to make sure all content-server intern tests completed successfully, and it's safe to remove?
| <h1 className="card-header text-center" id="clear-storage"> | ||
| Browser storage is cleared | ||
| </h1> | ||
| <h1 className="card-header text-center">Browser storage is cleared</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ID and comment removed as suggested
| assert.isObject(instance); | ||
| assert.lengthOf(Object.keys(instance), 3); | ||
| assert.equal(instance.method, 'get'); | ||
| assert.equal(instance.path, '/config'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So some of these routes are definately still being used in our frontend. This test calls the /config endpoint which settings uses.
It seems strange to me to remove the test but keep the api route functionality. The team mentioned that these tests are not being run. Would it make sense to migrate them off of intern instead?
To my understanding, when we move completely to a React frontend, some of these backend routes will still be used.
Also, if a test exists but does not run...does it really exists 😅
vbudhram
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paired with @toufali on this. He is planning on filing an issue and converting the tests to one of our supported frameworks.
Because
This pull request
Issue that this pull request solves
Closes: FXA-11695