mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(client): add settings side nav (#63034)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ test.describe('Initially', () => {
|
||||
test('should not render', async ({ page }) => {
|
||||
await page.goto('/settings');
|
||||
await expect(
|
||||
page.getByText('User Token', { exact: true })
|
||||
page.getByRole('main').getByText('User Token', { exact: true })
|
||||
).not.toBeVisible();
|
||||
});
|
||||
});
|
||||
@@ -32,7 +32,9 @@ test.describe('After creating token', () => {
|
||||
|
||||
await page.goto('/settings');
|
||||
// Set `exact` to `true` to only match the panel heading
|
||||
await expect(page.getByText('User Token', { exact: true })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('main').getByText('User Token', { exact: true })
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(
|
||||
'Your user token is used to save your progress on curriculum sections that use a virtual machine. If you suspect it has been compromised, you can delete it without losing any progress. A new one will be created automatically the next time you open a project.'
|
||||
@@ -42,7 +44,7 @@ test.describe('After creating token', () => {
|
||||
|
||||
await alertToBeVisible(page, translations.flash['token-deleted']);
|
||||
await expect(
|
||||
page.getByText('User Token', { exact: true })
|
||||
page.getByRole('main').getByText('User Token', { exact: true })
|
||||
).not.toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user