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

Attempt to improve gui design #434

Merged
merged 63 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
46d5f70
wip run test page
hannaeko Aug 22, 2023
c5870c2
update ns and ds new row behaviour
hannaeko Aug 22, 2023
52a9747
fix progress bar
hannaeko Aug 22, 2023
6f5c88b
fix secondary buttons on result page
hannaeko Aug 22, 2023
02d7827
move global style
hannaeko Aug 22, 2023
92c3066
add missing images
hannaeko Aug 22, 2023
ffa67e8
fix contrast and improve result page outline
hannaeko Aug 22, 2023
95145e8
wip result page
hannaeko Aug 22, 2023
522ed39
continue work on result controls
hannaeko Aug 23, 2023
d82aee1
change title types in about section
hannaeko Aug 23, 2023
4f6f626
small wording change
hannaeko Aug 23, 2023
e0ecd10
put faq content inside angular app
hannaeko Aug 23, 2023
8cec45f
fix unknown test making templating crash
hannaeko Aug 23, 2023
c6d6790
change default font
hannaeko Aug 24, 2023
b6f3d08
improve footer
hannaeko Aug 24, 2023
c52ea97
improve run domain form
hannaeko Aug 24, 2023
bd1f8ab
finish faq behaviour
hannaeko Aug 24, 2023
f97eb67
small tweaks
hannaeko Aug 24, 2023
778952d
Revert change default font, this need more thoughts
hannaeko Aug 24, 2023
be8422b
keep default font
hannaeko Aug 24, 2023
6ddae89
fix program version trigger with keyboard navigation
hannaeko Aug 24, 2023
b9ee465
tweak margins
hannaeko Aug 24, 2023
04c1c35
fix message banner
hannaeko Aug 24, 2023
b2e0ea4
Update Crowdin configuration file
hannaeko Aug 28, 2023
e3c8a32
fix focus transition duration for advanced switch
hannaeko Aug 28, 2023
7b03f6c
test i18n
hannaeko Aug 28, 2023
aadbd60
update translation source
hannaeko Aug 28, 2023
b2ae3ec
test link localization
hannaeko Aug 28, 2023
53be660
tag string to translate
hannaeko Aug 29, 2023
798e34a
fix i18n strings
hannaeko Aug 29, 2023
1fdc1c6
extract strings
hannaeko Aug 29, 2023
8702d09
some tweaks
hannaeko Aug 29, 2023
adc6d83
try to improve FAQ navigation
hannaeko Aug 29, 2023
cae5609
fix faq
hannaeko Aug 29, 2023
b516218
update some strings in faq
hannaeko Aug 29, 2023
0b6ef46
update french translation
hannaeko Aug 29, 2023
dd13742
i18n extract strings
hannaeko Aug 29, 2023
e34d968
update french translation
hannaeko Aug 29, 2023
7f7bbfb
fix translation
hannaeko Aug 30, 2023
b8b0b16
fix info notice wrapping
hannaeko Aug 30, 2023
4e4e014
adjust buttons colors
hannaeko Aug 30, 2023
9b288bd
tag forgotten strings for translation
hannaeko Aug 30, 2023
dd695f6
update french translation
hannaeko Aug 30, 2023
8ebdd55
add missing space
hannaeko Aug 30, 2023
9c301b1
fix main container not growing
hannaeko Sep 5, 2023
5d7cf87
revert FAQ changes
hannaeko Oct 24, 2023
8e1697d
fix faq heading style
hannaeko Nov 7, 2023
9f8e6d4
fix faq links
hannaeko Nov 7, 2023
8f96111
fix typo in french translation
hannaeko Nov 9, 2023
d28faac
improve form input
hannaeko Nov 23, 2023
c0c4ffe
avoid pixel unit for language icon
hannaeko Nov 23, 2023
60c308a
fix delete button alignment
hannaeko Nov 23, 2023
0194e4e
improve focus outline contrast for filter buttons
hannaeko Nov 27, 2023
a7bdbfd
move submit button and remove switch
hannaeko Nov 27, 2023
e81c51a
remove crowdin config
hannaeko Dec 7, 2023
68ff483
update readme
hannaeko Dec 7, 2023
d1ed139
update default contact address
hannaeko Dec 7, 2023
b2f65a6
remove line under h2
hannaeko Dec 7, 2023
b2b01af
replace article by section
hannaeko Dec 7, 2023
498d48b
update locale files
hannaeko Dec 7, 2023
1001c31
update e2e tests
hannaeko Dec 7, 2023
d06d0dc
update test screenshots
hannaeko Dec 8, 2023
d27b661
revert change of contact address
hannaeko Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ License
This is free software under a 2-clause BSD license. The full text of the license can
be found in the [LICENSE](LICENSE) file included in this respository.

Images `src/assets/images/person_looking_at_computer.svg` and `src/assets/images/world_connected.svg`
are taken from <https://undraw.co>, [full license](https://undraw.co/license).

Comment on lines +113 to +115
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this text be in the LICENSE file instead?

Copy link
Member Author

@hannaeko hannaeko Dec 12, 2023

Choose a reason for hiding this comment

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

Honestly I don't know. There was already no need to put a mention of the license in the first place.

Is this blocking or can this PR be merged?

Copy link
Contributor

@matsduf matsduf Dec 13, 2023

Choose a reason for hiding this comment

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

Please note that I have approved. I.e. not blocking at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay thanks, I will merge this so I can move on with the other PRs, and if we see the need we can rewrite this section / move it to the license file.


[Backend Configuration]: https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/backend.md
[GUI Configuration]: https://github.com/zonemaster/zonemaster/blob/master/docs/public/configuration/gui.md
Expand Down
6 changes: 3 additions & 3 deletions e2e/FR03.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ test.describe('Zonemaster test FR03 - [All appropriate fields should be writable
test('should be able to write in the main input', async ({ page }) => {
const testString = 'afnic.fr';

const domainInput = page.locator('#input_domain_form');
const domainInput = page.locator('#input-domain-form');
await domainInput.type(testString);
await expect(domainInput).toHaveValue(testString);

await showOptions(page);

const nsInput = page.locator('input[formControlName="ns"]');
const nsInput = page.locator('input[formControlName="ns"]').first();
await nsInput.type(testString);
await expect(nsInput).toHaveValue(testString);

const keytagInput = page.locator('input[formControlName="keytag"]');
const keytagInput = page.locator('input[formControlName="keytag"]').first();
await keytagInput.type(testString);
await expect(keytagInput).toHaveValue(testString);
});
Expand Down
7 changes: 2 additions & 5 deletions e2e/FR05.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ test.describe('Zonemaster test FR05 - [Supports internationalization]', () => {
test(`should have ${language} language option`, async ({ page }) => {
const langNavLink = page.locator(`select#languageSelection > option[lang="${code}"]`);
await expect(langNavLink).toHaveCount(1);
await expect(langNavLink).toHaveAttribute('lang', code);
})

test(`should switch to ${language}`, async ({ page }) => {
await setLang(page, code);
await expect(page.locator('input#input_domain_form')).toHaveAttribute('placeholder', expected);

const langNavLink = page.locator(`select#languageSelection > option[lang="${code}"]`);
await expect(langNavLink).toHaveCount(1);
await expect(langNavLink).toHaveAttribute('lang', code);
await expect(page.locator('label[for="input-domain-form"]')).toHaveText(expected);
})
}
});
2 changes: 1 addition & 1 deletion e2e/FR08.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ test.describe('Zonemaster test FR08 - [Presence of a default fallback language -
});

test('should have a fallback language - English', async ({ page }) => {
await expect(page.locator('input#input_domain_form')).toHaveAttribute('placeholder', 'Domain name');
await expect(page.locator('label[for="input-domain-form"]')).toHaveText('Domain name');
});
});
4 changes: 2 additions & 2 deletions e2e/FR09.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ test.describe('Zonemaster test FR09 - [Once a language is chosen, all other link
});

test('should keep french when opening faq page', async ({ page }) => {
await expect(page.locator('input#input_domain_form')).toHaveAttribute('placeholder', 'Nom de domaine');
await expect(page.locator('label[for="input-domain-form"]')).toHaveText('Nom de domaine');
await page.locator('a.nav-link[routerlink="/faq"]').click();
await expect(page.locator('section.main > div > h1')).toHaveText('FAQ');
await expect(page.locator('main h1')).toHaveText('Questions fréquentes');
await expect(page.locator('a.nav-link[routerlink="/run-test"]')).toHaveText("Lancer un test");
});
});
10 changes: 5 additions & 5 deletions e2e/FR10.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test, expect } = require('@playwright/test');

import { goToHome, clearBrowserCache } from './utils/app.utils';
import { goToHome, clearBrowserCache, showOptions } from './utils/app.utils';

test.describe('Zonemaster test FR10 - [On launching the URL opens with a default simple view]', () => {
test.beforeEach(async ({ page }) => {
Expand All @@ -9,21 +9,21 @@ test.describe('Zonemaster test FR10 - [On launching the URL opens with a default
});

test('should have [Run domain test] label visible', async ({ page }) => {
await expect(page.locator('h1', { hasText: 'Run domain test'})).toBeVisible();
await expect(page.locator('h1', { hasText: 'Check how your domain is doing'})).toBeVisible();
});

test('should have [Options] label visible and NOT selected', async ({ page }) => {
await expect(page.locator('label', { hasText: 'Options' })).toBeVisible();
await expect(page.locator('#advanced-toggle', { hasText: 'Show options' })).toBeVisible();

await expect(page.locator('#advanced-toggle')).toHaveAttribute('aria-expanded', 'false');
});


test('should have [Nameservers label] NOT visible', async ({ page }) => {
await expect(page.locator('h4', { hasText: 'Nameservers'})).toBeHidden();
await expect(page.locator('legend', { hasText: 'Nameservers'})).toBeHidden();
});

test('should have [DS records label] NOT visible', async ({ page }) => {
await expect(page.locator('h4', { hasText: 'Delegation Signers (DS records)'})).toBeHidden();
await expect(page.locator('legend', { hasText: 'DS records'})).toBeHidden();
});
});
Binary file modified e2e/FR11.e2e-spec.ts-snapshots/domain-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion e2e/FR15.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test.describe('Zonemaster test FR15 - [The advanced view should look the same in

test('should match the domain page with options on', async ({ page}) => {
await showOptions(page);
// Force wait 0.4s, for the switch animation to finish
// Force wait 0.4s, for the button icon animation to finish
await page.waitForTimeout(400);
expect(await page.screenshot()).toMatchSnapshot('domain_with_options.png');
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions e2e/FR16.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ test.describe('Zonemaster test FR16 - [The advanced view should have a text desc
});

test('should have a link to the proper faq answer', async ({ page }) => {
const alert = page.locator('.alert.alert-info');
const alert = page.locator('#advanced-options aside .alert');
await expect(alert).toBeVisible();
await expect(alert.locator('a')).toHaveAttribute('routerlink', '/faq');
await expect(alert.locator('a')).toHaveAttribute('fragment', 'q12');
await expect(alert.locator('a')).toHaveAttribute('fragment', 'what-is-an-undelegated-domain-test');
});

test('should have a description text in multi languages', async ({ page }) => {
Expand All @@ -26,7 +26,7 @@ test.describe('Zonemaster test FR16 - [The advanced view should have a text desc
for (const {lang, text} of testSuite) {
await setLang(page, lang);
await showOptions(page);
await expect(page.locator('.alert.alert-info a')).toContainText(text);
await expect(page.locator('#advanced-options aside .alert a')).toContainText(text);
}
});
});
8 changes: 4 additions & 4 deletions e2e/FR17.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ test.describe.serial('Zonemaster test FR17 - [Able to specify delegation paramet
});

test('should have one ns and digest form', async () => {
await expect(page.locator('div[formArrayName] .row')).toHaveCount(2);
await expect(page.locator('div[formArrayName] fieldset')).toHaveCount(2);
await expect(page.locator('input[formControlName="keytag"]')).toHaveCount(1);
await expect(page.locator('input[formControlName="ns"]')).toHaveCount(1);
});

test('should be possible to add new ns form', async () => {
await page.locator('div[formArrayName="nameservers"] .row:first-child .btn.add').click();
await page.locator('input[formControlName="ns"]').first().type('test');
await expect(page.locator('input[formControlName="ns"]')).toHaveCount(2);
await expect(page.locator('input[formControlName="keytag"]')).toHaveCount(1);
});

test('should be possible to add new digest form', async () => {
await page.locator('div[formArrayName="ds_info"] .row:first-child .btn.add').click();
await page.locator('input[formControlName="keytag"]').first().type('1234');
await expect(page.locator('input[formControlName="ns"]')).toHaveCount(2);
await expect(page.locator('input[formControlName="keytag"]')).toHaveCount(2);
});

test('should be possible to delete ns forms', async () => {
await page.locator('div[formArrayName="nameservers"] .row:first-child .btn.delete').click();
await page.locator('div[formArrayName="nameservers"] fieldset:first-child button.delete').click();
await expect(page.locator('input[formControlName="ns"]')).toHaveCount(1);
await expect(page.locator('input[formControlName="keytag"]')).toHaveCount(2);
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/FR18.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test.describe('Zonemaster test FR18 - [The GUI should be able to run tests by ju

test('should display progress bar', async ({ page }) => {
await expect(page.locator('.progress-bar')).toBeHidden();
await page.locator('#input_domain_form').type('progress.afNiC.Fr');
await page.locator('#input-domain-form').type('progress.afNiC.Fr');
await page.locator('div button.launch').click();
await expect(page.locator('.progress-bar')).toBeVisible({ timeout: 10000});
});
Expand Down
4 changes: 2 additions & 2 deletions e2e/FR19.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test.describe('Zonemaster test FR19 - [The GUI should be able to run the test wi

test('should NOT display progress bar when we add a NS ip', async ({ page }) => {
await expect(page.locator('.progress-bar')).toBeHidden();
await page.locator('#input_domain_form').type('progress.afNiC.Fr');
await page.locator('#input-domain-form').type('progress.afNiC.Fr');
await page.locator('input[formControlName="ip"]').type('192.134.4.1');
await page.locator('div button.launch').click();

Expand All @@ -28,7 +28,7 @@ test.describe('Zonemaster test FR19 - [The GUI should be able to run the test wi

test('should display progress bar when we add a NS name', async ({ page }) => {
await expect(page.locator('.progress-bar')).toBeHidden();
await page.locator('#input_domain_form').type('progress.afNiC.Fr');
await page.locator('#input-domain-form').type('progress.afNiC.Fr');
await page.locator('input[formControlName="ns"]').type('ns1.nic.fr');
await page.locator('div button.launch').click();
await expect(page.locator('.progress-bar')).toBeVisible({ timeout: 10000 });
Expand Down
10 changes: 5 additions & 5 deletions e2e/FR20.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ test.describe('Zonemaster test FR20 - [The user must be able to submit one or mo
test('should display progress bar when we add a DS entry and launch a test', async ({ page }) => {
await expect(page.locator('.progress-bar')).toBeHidden();

await page.locator('#input_domain_form').type('progress.afNiC.Fr');
await page.locator('#input-domain-form').type('progress.afNiC.Fr');

await page.locator('input[formControlName="keytag"]').type('37610');
await page.locator('input[formControlName="digest"]').type('d2681e301f632bd76544e6d5b6631a12d97b5479ff07cd24efecd19203c77db3');
await page.locator('input[formControlName="keytag"]').first().type('37610');
await page.locator('input[formControlName="digest"]').first().type('d2681e301f632bd76544e6d5b6631a12d97b5479ff07cd24efecd19203c77db3');

await page.locator('select[formControlName="algorithm"]').selectOption({ label: '8 - RSASHA256'});
await page.locator('select[formControlName="digtype"]').selectOption({ label: '2 - SHA-256'});
await page.locator('select[formControlName="algorithm"]').first().selectOption({ label: '8 - RSASHA256'});
await page.locator('select[formControlName="digtype"]').first().selectOption({ label: '2 - SHA-256'});

await page.locator('div button.launch').click();
await expect(page.locator('.progress-bar')).toBeVisible({ timeout: 10000 });
Expand Down
12 changes: 6 additions & 6 deletions e2e/FR21.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ test.describe.serial('Zonemaster test FR21 - [Able to provide a summarized resul

test('should display summary', async () => {
await expect(page.locator('.progress-bar')).toBeHidden();
await page.locator('#input_domain_form').type('results.afNiC.Fr');
await page.locator('#input-domain-form').type('results.afNiC.Fr');
await page.locator('div button.launch').click();

await expect(page.locator('div.result.container')).toBeVisible({ timeout: 10000 });
await expect(page.locator('section.result')).toBeVisible({ timeout: 10000 });

const messageCountBadges = page.locator('.nav.nav-pills.vertical-align.filter > li > a');
const messageCountBadges = page.locator('fieldset.severity-levels label');
const expectedLabels = ['All', 'Info', 'Notice', 'Warning', 'Error', 'Critical'];

await expect(messageCountBadges).toHaveCount(6);
await expect(messageCountBadges).toHaveCount(expectedLabels.length);

for (const idx in expectedLabels) {
await expect(messageCountBadges.nth(idx)).toContainText(expectedLabels[idx]);
Expand All @@ -35,15 +35,15 @@ test.describe.serial('Zonemaster test FR21 - [Able to provide a summarized resul

test('should display number of each level', async () => {
const expectedCounts = ['52', '49', '3', '0', '0', '0'];
const messageCountBadges = page.locator('.nav.nav-pills.vertical-align.filter > li > a > span.badge');
const messageCountBadges = page.locator('fieldset.severity-levels label span.badge');

for (const idx in expectedCounts) {
await expect(messageCountBadges.nth(idx)).toHaveText(expectedCounts[idx]);
}
});

test('should display summary with good colors', async () => {
const filterButtons = page.locator('.nav.nav-pills.vertical-align.filter > li > a');
const filterButtons = page.locator('fieldset.severity-levels input[type="checkbox"]');

for (const idx of [1, 2, 3, 4, 5]) {
await filterButtons.nth(idx).click();
Expand Down
Binary file modified e2e/FR21.e2e-spec.ts-snapshots/results-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions e2e/FR22.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ test.describe('Zonemaster test FR22 - [Provide the possibility to see more infor
test('should display full messages', async({ page }) => {
await expect(page.locator('.progress-bar')).toBeHidden();

await page.locator('#input_domain_form').type('results.afNiC.Fr');
await page.locator('div button.launch').click();
await page.locator('#input-domain-form').type('results.afNiC.Fr');
await page.locator('button.launch').click();

// Basic header is the second one
const basicHeader = page.locator('.result h3').nth(1);
const basicTestcases = page.locator('#module-BASIC article');
const basicTestcases = page.locator('#module-BASIC section');

// Basic02 header is the second one in the Basic results
const basic02Header = page.locator('#module-BASIC h4').nth(1);
Expand Down
4 changes: 2 additions & 2 deletions e2e/FR26.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ test.describe('Zonemaster test FR26 - [Should be able to show a progress bar wit

test('should display progress bar', async ({ page }) => {
await expect(page.locator('.progress-bar')).toBeHidden();
await page.locator('#input_domain_form').type('progress.afNiC.Fr');
await page.locator('div button.launch').click();
await page.locator('#input-domain-form').type('progress.afNiC.Fr');
await page.locator('button.launch').click();
await expect(page.locator('.progress-bar')).toBeVisible({ timeout: 10000});
await expect(page.locator('.progress-value')).toHaveText('50%');
});
Expand Down
24 changes: 12 additions & 12 deletions e2e/navigation.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,43 @@ test.describe('Navigation should be consistent and honor browser behaviour', ()

// Create a new test
await expect(page).toHaveURL(domainCheckUrl);
await page.locator('#input_domain_form').type(firstDomain);
await page.locator('div button.launch').click();
await page.locator('#input-domain-form').type(firstDomain);
await page.locator('button.launch').click();
// Verify that when the test finishes the browser is redirect to the result page with an url /result/<id1>.
// The "run domain test" form is visible.
await expect(page.locator('.result-header > h2')).toHaveText(firstDomain, { timeout: 10000 });
await expect(page.locator('div.result.container')).toBeVisible();
await expect(page.locator('section.result h2')).toContainText(firstDomain, { timeout: 10000 });
await expect(page.locator('section.result')).toBeVisible();
await expect(page.locator('form.domain')).toBeVisible();
await expect(page).toHaveURL(firstTestUrl);
// Press the back button in the browser.
await page.goBack()
// Verify that only the "run domain test" form is displayed. The url should be /run-test.
await expect(page).toHaveURL(domainCheckUrl);
await expect(page.locator('div.result.container')).not.toBeVisible();
await expect(page.locator('section.result')).not.toBeVisible();
await expect(page.locator('form.domain')).toBeVisible();
// Press the forward button in the browser.
await page.goForward();
// Verify that the previous test result is displayed with the url /result/<id1>.
// The "run domain test" form should still be visible.
await expect(page.locator('.result-header > h2')).toHaveText(firstDomain, { timeout: 10000 });
await expect(page.locator('div.result.container')).toBeVisible();
await expect(page.locator('section.result h2')).toContainText(firstDomain, { timeout: 10000 });
await expect(page.locator('section.result')).toBeVisible();
await expect(page.locator('form.domain')).toBeVisible();
await expect(page).toHaveURL(firstTestUrl);
// Create a second test for an other domain from the result page.
await page.locator('#input_domain_form').type(secondDomain);
await page.locator('#input-domain-form').type(secondDomain);
await page.locator('div button.launch').click();
// When the second test finishes the url should change to /result/<id2>.
// The result for the second test should be displayed and the "run domain test" form should still be visible.
await expect(page.locator('.result-header > h2')).toHaveText(secondDomain, { timeout: 10000 });
await expect(page.locator('div.result.container')).toBeVisible();
await expect(page.locator('section.result h2')).toContainText(secondDomain, { timeout: 10000 });
await expect(page.locator('section.result')).toBeVisible();
await expect(page.locator('form.domain')).toBeVisible();
await expect(page).toHaveURL(secondTestUrl);
// Refresh the page.
await page.reload();
// The "run domain test" form is not visible, instead a Result header is displayed.
await expect(page.locator('h1')).toHaveText('Result');
await expect(page.locator('div.result.container')).toBeVisible({ timeout: 10000 });
await expect(page.locator('.result-header > h2')).toHaveText(secondDomain);
await expect(page.locator('section.result')).toBeVisible({ timeout: 10000 });
await expect(page.locator('section.result h2')).toContainText(secondDomain);
await expect(page.locator('form.domain')).not.toBeVisible();
});
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ app-root {
display: flex;
flex-direction: column;
}

main {
flex-grow: 1;
}
10 changes: 2 additions & 8 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<app-navigation></app-navigation>
<app-message-banner></app-message-banner>
<app-alert></app-alert>
<main>
<main class="container">
<router-outlet></router-outlet>
</main>
<app-footer></app-footer>







4 changes: 1 addition & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import {ViewEncapsulation} from '@angular/core';
import { ViewEncapsulation } from '@angular/core';

@Component({
selector: 'app-root',
Expand All @@ -10,6 +10,4 @@ import {ViewEncapsulation} from '@angular/core';
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
title = 'app';
}

Loading