diff --git a/.gitignore b/.gitignore index 3020322..98121b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules tmp config/local.json -social-media \ No newline at end of file +social-media +.vscode \ No newline at end of file diff --git a/acceptance/new-user/sign-up.test.js b/acceptance/new-user/sign-up.test.js index 35a8e35..aae8c52 100644 --- a/acceptance/new-user/sign-up.test.js +++ b/acceptance/new-user/sign-up.test.js @@ -37,13 +37,15 @@ afterAll(async () => { describe("New user navigates in the page", () => { test("New user sees a sign up page", async () => { await page.goto(HOME_PAGE); - + await page.waitForResponse((res) => res.url().endsWith("/users/self")); - await page.waitForSelector("button.login-btn-text"); + + const LOGIN_BUTTON_CSS_SELECTOR = "button.btn-login-text"; + await page.waitForSelector(LOGIN_BUTTON_CSS_SELECTOR); await Promise.all([ page.waitForNavigation(), - page.click("button.login-btn-text"), + page.click(LOGIN_BUTTON_CSS_SELECTOR), ]); const ghUsernameInput = await page.waitForSelector("input#login_field"); diff --git a/visitor-tests/home-page.test.js b/visitor-tests/home-page.test.js index 5192517..5b1cd7d 100644 --- a/visitor-tests/home-page.test.js +++ b/visitor-tests/home-page.test.js @@ -24,11 +24,6 @@ afterAll(async () => { test("Text checks", async () => { await page.goto(HOME_PAGE); - await page.waitForSelector(".main-banner"); - const bannerText = await page.$eval(".notif", (el) => el.innerText); - expect(bannerText).toMatch( - "New 1 year Anniversary -- New features available for you Check them out!" - ); await page.waitForSelector(".welcome-title"); const titleText = await page.$eval(".welcome-title", (el) => el.innerText);